Source Code
Overview
ETH Balance
ETH Value
$0.00Latest 6 from a total of 6 transactions
| Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
|---|---|---|---|---|---|---|---|---|---|
| 0x42000061 | 975215 | 796 days ago | IN | 0 ETH | 0.00027845 | ||||
| 0x42000061 | 975212 | 796 days ago | IN | 0 ETH | 0.00027845 | ||||
| 0x42000061 | 975205 | 796 days ago | IN | 0 ETH | 0.00029191 | ||||
| 0x42000061 | 972599 | 796 days ago | IN | 0 ETH | 0.00027289 | ||||
| 0x42000061 | 972578 | 796 days ago | IN | 0 ETH | 0.00033104 | ||||
| 0x42000061 | 972565 | 796 days ago | IN | 0 ETH | 0.00028753 |
Cross-Chain Transactions
Loading...
Loading
Contract Name:
WooracleV2_1_ZipInherit
Compiler Version
v0.8.14+commit.80d49f37
Optimization Enabled:
Yes with 20000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT
pragma solidity =0.8.14;
/*
░██╗░░░░░░░██╗░█████╗░░█████╗░░░░░░░███████╗██╗
░██║░░██╗░░██║██╔══██╗██╔══██╗░░░░░░██╔════╝██║
░╚██╗████╗██╔╝██║░░██║██║░░██║█████╗█████╗░░██║
░░████╔═████║░██║░░██║██║░░██║╚════╝██╔══╝░░██║
░░╚██╔╝░╚██╔╝░╚█████╔╝╚█████╔╝░░░░░░██║░░░░░██║
░░░╚═╝░░░╚═╝░░░╚════╝░░╚════╝░░░░░░░╚═╝░░░░░╚═╝
*
* MIT License
* ===========
*
* Copyright (c) 2020 WooTrade
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
import {WooracleV2_1} from "./WooracleV2_1.sol";
import {IERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "../libraries/TransferHelper.sol";
/// @title Wooracle V2.1 contract for L2 chains for calldata zip.
/// subversion 1 change: no timestamp update for posting price from WooPP.
contract WooracleV2_1_ZipInherit is WooracleV2_1 {
mapping(uint8 => address) public bases;
function setBase(uint8 _id, address _base) external onlyAdmin {
require(getBase(_id) == address(0), "WooracleV2_1_ZipInherit: !id_SET_ALREADY");
bases[_id] = _base;
}
function getBase(uint8 _id) public view returns (address) {
address[4] memory CONST_BASES = [
// mload
// NOTE: Update token address for different chains
0x5300000000000000000000000000000000000004, // WETH
0x3C1BCa5a656e69edCD0D4E36BEbb3FcDAcA60Cf1, // WBTC
0x06eFdBFf2a14a7c8E15944D1F4A48F9F95F663A4, // USDC
0xf55BEC9cafDbE8730f096Aa55dad6D22d44099Df // USDT
];
return _id < 4 ? CONST_BASES[_id] : bases[_id];
}
/* ----- External Functions ----- */
// https://docs.soliditylang.org/en/v0.8.12/contracts.html#fallback-function
// prettier-ignore
fallback (bytes calldata _input) external onlyAdmin returns (bytes memory _output) {
/*
2 bit: 0: post prices, 1: post states, 2,3: TBD
6 bits: length
post prices:
[price] -->
base token: 8 bites (1 byte)
price data: 32 bits = (27, 5)
post states:
[states] -->
base token: 8 bites (1 byte)
price: 32 bits (4 bytes) = (27, 5)
k coeff: 16 bits (2 bytes) = (11, 5)
s spread: 16 bits (2 bytes) = (11, 5)
*/
uint256 x = _input.length;
require(x > 0, "WooracleV2_1_ZipInherit: !calldata");
uint8 firstByte = uint8(bytes1(_input[0]));
uint8 op = firstByte >> 6; // 11000000
uint8 len = firstByte & 0x3F; // 00111111
if (op == 0) {
// post prices list
address base;
uint128 p;
for (uint256 i = 0; i < len; ++i) {
base = getBase(uint8(bytes1(_input[1 + i * 5:1 + i * 5 + 1])));
p = _price(uint32(bytes4(_input[1 + i * 5 + 1:1 + i * 5 + 5])));
infos[base].price = p;
}
timestamp = block.timestamp;
} else if (op == 1) {
// post states list
address base;
uint128 p;
uint64 s;
uint64 k;
for (uint256 i = 0; i < len; ++i) {
base = getBase(uint8(bytes1(_input[1 + i * 9:1 + i * 9 + 1])));
p = _price(uint32(bytes4(_input[1 + i * 9 + 1:1 + i * 9 + 5])));
s = _ks(uint16(bytes2(_input[1 + i * 9 + 5:1 + i * 9 + 7])));
k = _ks(uint16(bytes2(_input[1 + i * 9 + 7:1 + i * 9 + 9])));
_setState(base, p, s, k);
}
timestamp = block.timestamp;
} else {
// not supported
}
}
function _price(uint32 b) internal pure returns (uint128) {
return uint128((b >> 5) * (10**(b & 0x1F))); // 0x1F = 00011111
}
function _ks(uint16 b) internal pure returns (uint64) {
return uint64((b >> 5) * (10**(b & 0x1F)));
}
function inCaseTokenGotStuck(address stuckToken) external onlyAdmin {
if (stuckToken == 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE) {
TransferHelper.safeTransferETH(msg.sender, address(this).balance);
} else {
uint256 amount = IERC20(stuckToken).balanceOf(address(this));
TransferHelper.safeTransfer(stuckToken, msg.sender, amount);
}
}
}// 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) (security/ReentrancyGuard.sol)
pragma solidity ^0.8.0;
/**
* @dev Contract module that helps prevent reentrant calls to a function.
*
* Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
* available, which can be applied to functions to make sure there are no nested
* (reentrant) calls to them.
*
* Note that because there is a single `nonReentrant` guard, functions marked as
* `nonReentrant` may not call one another. This can be worked around by making
* those functions `private`, and then adding `external` `nonReentrant` entry
* points to them.
*
* TIP: If you would like to learn more about reentrancy and alternative ways
* to protect against it, check out our blog post
* https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
*/
abstract contract ReentrancyGuard {
// Booleans are more expensive than uint256 or any type that takes up a full
// word because each write operation emits an extra SLOAD to first read the
// slot's contents, replace the bits taken up by the boolean, and then write
// back. This is the compiler's defense against contract upgrades and
// pointer aliasing, and it cannot be disabled.
// The values being non-zero value makes deployment a bit more expensive,
// but in exchange the refund on every call to nonReentrant will be lower in
// amount. Since refunds are capped to a percentage of the total
// transaction's gas, it is best to keep them low in cases like this one, to
// increase the likelihood of the full refund coming into effect.
uint256 private constant _NOT_ENTERED = 1;
uint256 private constant _ENTERED = 2;
uint256 private _status;
constructor() {
_status = _NOT_ENTERED;
}
/**
* @dev Prevents a contract from calling itself, directly or indirectly.
* Calling a `nonReentrant` function from another `nonReentrant`
* function is not supported. It is possible to prevent this from happening
* by making the `nonReentrant` function external, and making it call a
* `private` function that does the actual work.
*/
modifier nonReentrant() {
_nonReentrantBefore();
_;
_nonReentrantAfter();
}
function _nonReentrantBefore() private {
// On the first call to nonReentrant, _status will be _NOT_ENTERED
require(_status != _ENTERED, "ReentrancyGuard: reentrant call");
// Any calls to nonReentrant after this point will fail
_status = _ENTERED;
}
function _nonReentrantAfter() private {
// By storing the original value once again, a refund is triggered (see
// https://eips.ethereum.org/EIPS/eip-2200)
_status = _NOT_ENTERED;
}
/**
* @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a
* `nonReentrant` function in the call stack.
*/
function _reentrancyGuardEntered() internal view returns (bool) {
return _status == _ENTERED;
}
}// 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;
}
}// SPDX-License-Identifier: MIT
pragma solidity =0.8.14;
interface AggregatorV3Interface {
function decimals() external view returns (uint8);
function description() external view returns (string memory);
function version() external view returns (uint256);
/// getRoundData and latestRoundData should both raise "No data present"
/// if they do not have data to report, instead of returning unset values
/// which could be misinterpreted as actual reported values.
function getRoundData(uint80 _roundId)
external
view
returns (
uint80 roundId,
int256 answer,
uint256 startedAt,
uint256 updatedAt,
uint80 answeredInRound
);
function latestRoundData()
external
view
returns (
uint80 roundId,
int256 answer,
uint256 startedAt,
uint256 updatedAt,
uint80 answeredInRound
);
}// SPDX-License-Identifier: MIT
pragma solidity =0.8.14;
/*
░██╗░░░░░░░██╗░█████╗░░█████╗░░░░░░░███████╗██╗
░██║░░██╗░░██║██╔══██╗██╔══██╗░░░░░░██╔════╝██║
░╚██╗████╗██╔╝██║░░██║██║░░██║█████╗█████╗░░██║
░░████╔═████║░██║░░██║██║░░██║╚════╝██╔══╝░░██║
░░╚██╔╝░╚██╔╝░╚█████╔╝╚█████╔╝░░░░░░██║░░░░░██║
░░░╚═╝░░░╚═╝░░░╚════╝░░╚════╝░░░░░░░╚═╝░░░░░╚═╝
*
* MIT License
* ===========
*
* Copyright (c) 2020 WooTrade
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
/// @title The oracle V2 interface by Woo.Network.
/// @notice update and posted the latest price info by Woo.
interface IWooracleV2 {
struct State {
uint128 price;
uint64 spread;
uint64 coeff;
bool woFeasible;
}
/// @notice Wooracle spread value
function woSpread(address base) external view returns (uint64);
/// @notice Wooracle coeff value
function woCoeff(address base) external view returns (uint64);
/// @notice Wooracle state for the specified base token
function woState(address base) external view returns (State memory);
/// @notice Chainlink oracle address for the specified base token
function cloAddress(address base) external view returns (address clo);
/// @notice ChainLink price of the base token / quote token
function cloPrice(address base) external view returns (uint256 price, uint256 timestamp);
/// @notice Wooracle price of the base token
function woPrice(address base) external view returns (uint128 price, uint256 timestamp);
/// @notice Returns Woooracle price if available, otherwise fallback to ChainLink
function price(address base) external view returns (uint256 priceNow, bool feasible);
/// @notice Updates the Wooracle price for the specified base token
function postPrice(address base, uint128 newPrice) external;
function postState(
address base,
uint128 newPrice,
uint64 newSpread,
uint64 newCoeff
) external;
/// @notice State of the specified base token.
function state(address base) external view returns (State memory);
/// @notice The price decimal for the specified base token (e.g. 8)
function decimals(address base) external view returns (uint8);
/// @notice The quote token for calculating WooPP query price
function quoteToken() external view returns (address);
/// @notice last updated timestamp
function timestamp() external view returns (uint256);
/// @notice Flag for Wooracle price feasible
function isWoFeasible(address base) external view returns (bool);
/// @notice Flag for account admin
function isAdmin(address account) external view returns (bool);
}// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity ^0.8.0;
// helper methods for interacting with ERC20 tokens and sending ETH that do not consistently return true/false
library TransferHelper {
function safeApprove(
address token,
address to,
uint256 value
) internal {
// bytes4(keccak256(bytes('approve(address,uint256)')));
(bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x095ea7b3, to, value));
require(
success && (data.length == 0 || abi.decode(data, (bool))),
"TransferHelper::safeApprove: approve failed"
);
}
function safeTransfer(
address token,
address to,
uint256 value
) internal {
// bytes4(keccak256(bytes('transfer(address,uint256)')));
(bool success, bytes memory data) = token.call(abi.encodeWithSelector(0xa9059cbb, to, value));
require(
success && (data.length == 0 || abi.decode(data, (bool))),
"TransferHelper::safeTransfer: transfer failed"
);
}
function safeTransferFrom(
address token,
address from,
address to,
uint256 value
) internal {
// bytes4(keccak256(bytes('transferFrom(address,address,uint256)')));
(bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x23b872dd, from, to, value));
require(
success && (data.length == 0 || abi.decode(data, (bool))),
"TransferHelper::transferFrom: transferFrom failed"
);
}
function safeTransferETH(address to, uint256 value) internal {
(bool success, ) = to.call{value: value}(new bytes(0));
require(success, "TransferHelper::safeTransferETH: ETH transfer failed");
}
}// SPDX-License-Identifier: MIT
pragma solidity =0.8.14;
/*
░██╗░░░░░░░██╗░█████╗░░█████╗░░░░░░░███████╗██╗
░██║░░██╗░░██║██╔══██╗██╔══██╗░░░░░░██╔════╝██║
░╚██╗████╗██╔╝██║░░██║██║░░██║█████╗█████╗░░██║
░░████╔═████║░██║░░██║██║░░██║╚════╝██╔══╝░░██║
░░╚██╔╝░╚██╔╝░╚█████╔╝╚█████╔╝░░░░░░██║░░░░░██║
░░░╚═╝░░░╚═╝░░░╚════╝░░╚════╝░░░░░░░╚═╝░░░░░╚═╝
*
* MIT License
* ===========
*
* Copyright (c) 2020 WooTrade
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
import "../interfaces/IWooracleV2.sol";
import "../interfaces/AggregatorV3Interface.sol";
// OpenZeppelin contracts
import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";
import {ReentrancyGuard} from "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import {IERC20, SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
/// @title Wooracle V2 contract:
/// subversion 1 change: no timestamp update for posting price from WooPP.
contract WooracleV2_1 is Ownable, IWooracleV2 {
/* ----- State variables ----- */
// 128 + 64 + 64 = 256 bits (slot size)
struct TokenInfo {
uint128 price; // as chainlink oracle (e.g. decimal = 8)
uint64 coeff; // k: decimal = 18. 18.4 * 1e18
uint64 spread; // s: decimal = 18. spread <= 2e18 18.4 * 1e18
}
struct CLOracle {
address oracle;
uint8 decimal;
bool cloPreferred;
}
mapping(address => TokenInfo) public infos;
mapping(address => CLOracle) public clOracles;
address public quoteToken;
uint256 public timestamp;
uint256 public staleDuration;
uint64 public bound;
mapping(address => bool) public isAdmin;
address public wooPP;
constructor() {
staleDuration = uint256(300);
bound = uint64(1e16); // 1%
}
modifier onlyAdmin() {
require(owner() == msg.sender || isAdmin[msg.sender], "Wooracle: !Admin");
_;
}
/* ----- External Functions ----- */
function setWooPP(address _wooPP) external onlyAdmin {
wooPP = _wooPP;
}
function setAdmin(address addr, bool flag) external onlyOwner {
isAdmin[addr] = flag;
}
/// @dev Set the quote token address.
/// @param _oracle the token address
function setQuoteToken(address _quote, address _oracle) external onlyAdmin {
quoteToken = _quote;
CLOracle storage cloRef = clOracles[_quote];
cloRef.oracle = _oracle;
cloRef.decimal = AggregatorV3Interface(_oracle).decimals();
}
function setBound(uint64 _bound) external onlyOwner {
bound = _bound;
}
function setCLOracle(
address token,
address _oracle,
bool _cloPreferred
) external onlyAdmin {
CLOracle storage cloRef = clOracles[token];
cloRef.oracle = _oracle;
cloRef.decimal = AggregatorV3Interface(_oracle).decimals();
cloRef.cloPreferred = _cloPreferred;
}
function setCloPreferred(address token, bool _cloPreferred) external onlyAdmin {
CLOracle storage cloRef = clOracles[token];
cloRef.cloPreferred = _cloPreferred;
}
/// @dev Set the staleDuration.
/// @param newStaleDuration the new stale duration
function setStaleDuration(uint256 newStaleDuration) external onlyAdmin {
staleDuration = newStaleDuration;
}
/// @dev Update the base token prices.
/// @param base the baseToken address
/// @param newPrice the new prices for the base token
function postPrice(address base, uint128 newPrice) external onlyAdmin {
infos[base].price = newPrice;
if (msg.sender != wooPP) {
timestamp = block.timestamp;
}
}
/// @dev No wooPP check for msg.sedner; always update the timestamp.
/// @param base the baseToken address
/// @param newPrice the new prices for the base token
function postPriceLegacy(address base, uint128 newPrice) external onlyAdmin {
infos[base].price = newPrice;
timestamp = block.timestamp;
}
/// @dev batch update baseTokens prices
/// @param bases list of baseToken address
/// @param newPrices the updated prices list
function postPriceList(address[] calldata bases, uint128[] calldata newPrices) external onlyAdmin {
uint256 length = bases.length;
require(length == newPrices.length, "Wooracle: length_INVALID");
// TODO: gas optimization:
// https://ethereum.stackexchange.com/questions/113221/what-is-the-purpose-of-unchecked-in-solidity
// https://forum.openzeppelin.com/t/a-collection-of-gas-optimisation-tricks/19966
unchecked {
for (uint256 i = 0; i < length; i++) {
infos[bases[i]].price = newPrices[i];
}
}
timestamp = block.timestamp;
}
/// @dev update the spreads info.
/// @param base baseToken address
/// @param newSpread the new spreads
function postSpread(address base, uint64 newSpread) external onlyAdmin {
infos[base].spread = newSpread;
timestamp = block.timestamp;
}
/// @dev batch update the spreads info.
/// @param bases list of baseToken address
/// @param newSpreads list of spreads info
function postSpreadList(address[] calldata bases, uint64[] calldata newSpreads) external onlyAdmin {
uint256 length = bases.length;
require(length == newSpreads.length, "Wooracle: length_INVALID");
unchecked {
for (uint256 i = 0; i < length; i++) {
infos[bases[i]].spread = newSpreads[i];
}
}
timestamp = block.timestamp;
}
/// @dev update the state of the given base token.
/// @param base baseToken address
/// @param newPrice the new prices
/// @param newSpread the new spreads
/// @param newCoeff the new slippage coefficent
function postState(
address base,
uint128 newPrice,
uint64 newSpread,
uint64 newCoeff
) external onlyAdmin {
_setState(base, newPrice, newSpread, newCoeff);
timestamp = block.timestamp;
}
/// @dev batch update the prices, spreads and slipagge coeffs info.
/// @param bases list of baseToken address
/// @param newPrices the prices list
/// @param newSpreads the spreads list
/// @param newCoeffs the slippage coefficent list
function postStateList(
address[] calldata bases,
uint128[] calldata newPrices,
uint64[] calldata newSpreads,
uint64[] calldata newCoeffs
) external onlyAdmin {
uint256 length = bases.length;
unchecked {
for (uint256 i = 0; i < length; i++) {
_setState(bases[i], newPrices[i], newSpreads[i], newCoeffs[i]);
}
}
timestamp = block.timestamp;
}
/*
Price logic:
- woPrice: wooracle price
- cloPrice: chainlink price
woFeasible is, price > 0 and price timestamp NOT stale
when woFeasible && priceWithinBound -> woPrice, feasible
when woFeasible && !priceWithinBound -> woPrice, infeasible
when !woFeasible && clo_preferred -> cloPrice, feasible
when !woFeasible && !clo_preferred -> cloPrice, infeasible
*/
function price(address base) public view override returns (uint256 priceOut, bool feasible) {
uint256 woPrice_ = uint256(infos[base].price);
uint256 woPriceTimestamp = timestamp;
(uint256 cloPrice_, ) = _cloPriceInQuote(base, quoteToken);
bool woFeasible = woPrice_ != 0 && block.timestamp <= (woPriceTimestamp + staleDuration);
bool woPriceInBound = cloPrice_ == 0 ||
((cloPrice_ * (1e18 - bound)) / 1e18 <= woPrice_ && woPrice_ <= (cloPrice_ * (1e18 + bound)) / 1e18);
if (woFeasible) {
priceOut = woPrice_;
feasible = woPriceInBound;
} else {
priceOut = clOracles[base].cloPreferred ? cloPrice_ : 0;
feasible = priceOut != 0;
}
}
/// @notice the price decimal for the specified base token
function decimals(address base) external view override returns (uint8) {
uint8 d = clOracles[base].decimal;
return d != 0 ? d : 8;
}
function cloPrice(address base) external view override returns (uint256 refPrice, uint256 refTimestamp) {
return _cloPriceInQuote(base, quoteToken);
}
function isWoFeasible(address base) external view override returns (bool) {
return infos[base].price != 0 && block.timestamp <= (timestamp + staleDuration);
}
function woSpread(address base) external view override returns (uint64) {
return infos[base].spread;
}
function woCoeff(address base) external view override returns (uint64) {
return infos[base].coeff;
}
// Wooracle price of the base token
function woPrice(address base) external view override returns (uint128 priceOut, uint256 priceTimestampOut) {
priceOut = infos[base].price;
priceTimestampOut = timestamp;
}
function woState(address base) external view override returns (State memory) {
TokenInfo memory info = infos[base];
return
State({
price: info.price,
spread: info.spread,
coeff: info.coeff,
woFeasible: (info.price != 0 && block.timestamp <= (timestamp + staleDuration))
});
}
function state(address base) external view override returns (State memory) {
TokenInfo memory info = infos[base];
(uint256 basePrice, bool feasible) = price(base);
return State({price: uint128(basePrice), spread: info.spread, coeff: info.coeff, woFeasible: feasible});
}
function cloAddress(address base) external view override returns (address clo) {
clo = clOracles[base].oracle;
}
/* ----- Internal & Private Functions ----- */
function _setState(
address base,
uint128 newPrice,
uint64 newSpread,
uint64 newCoeff
) internal {
TokenInfo storage info = infos[base];
info.price = newPrice;
info.spread = newSpread;
info.coeff = newCoeff;
}
function _cloPriceInQuote(address fromToken, address toToken)
private
view
returns (uint256 refPrice, uint256 refTimestamp)
{
address baseOracle = clOracles[fromToken].oracle;
if (baseOracle == address(0)) {
return (0, 0);
}
address quoteOracle = clOracles[toToken].oracle;
uint8 quoteDecimal = clOracles[toToken].decimal;
(, int256 rawBaseRefPrice, , uint256 baseUpdatedAt, ) = AggregatorV3Interface(baseOracle).latestRoundData();
(, int256 rawQuoteRefPrice, , uint256 quoteUpdatedAt, ) = AggregatorV3Interface(quoteOracle).latestRoundData();
uint256 baseRefPrice = uint256(rawBaseRefPrice);
uint256 quoteRefPrice = uint256(rawQuoteRefPrice);
// NOTE: Assume wooracle token decimal is same as chainlink token decimal.
uint256 ceoff = uint256(10)**quoteDecimal;
refPrice = (baseRefPrice * ceoff) / quoteRefPrice;
refTimestamp = baseUpdatedAt >= quoteUpdatedAt ? quoteUpdatedAt : baseUpdatedAt;
}
}{
"optimizer": {
"enabled": true,
"runs": 20000
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"libraries": {}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"stateMutability":"nonpayable","type":"fallback"},{"inputs":[{"internalType":"uint8","name":"","type":"uint8"}],"name":"bases","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"bound","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"clOracles","outputs":[{"internalType":"address","name":"oracle","type":"address"},{"internalType":"uint8","name":"decimal","type":"uint8"},{"internalType":"bool","name":"cloPreferred","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"base","type":"address"}],"name":"cloAddress","outputs":[{"internalType":"address","name":"clo","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"base","type":"address"}],"name":"cloPrice","outputs":[{"internalType":"uint256","name":"refPrice","type":"uint256"},{"internalType":"uint256","name":"refTimestamp","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"base","type":"address"}],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"_id","type":"uint8"}],"name":"getBase","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"stuckToken","type":"address"}],"name":"inCaseTokenGotStuck","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"infos","outputs":[{"internalType":"uint128","name":"price","type":"uint128"},{"internalType":"uint64","name":"coeff","type":"uint64"},{"internalType":"uint64","name":"spread","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isAdmin","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"base","type":"address"}],"name":"isWoFeasible","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"base","type":"address"},{"internalType":"uint128","name":"newPrice","type":"uint128"}],"name":"postPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"base","type":"address"},{"internalType":"uint128","name":"newPrice","type":"uint128"}],"name":"postPriceLegacy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"bases","type":"address[]"},{"internalType":"uint128[]","name":"newPrices","type":"uint128[]"}],"name":"postPriceList","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"base","type":"address"},{"internalType":"uint64","name":"newSpread","type":"uint64"}],"name":"postSpread","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"bases","type":"address[]"},{"internalType":"uint64[]","name":"newSpreads","type":"uint64[]"}],"name":"postSpreadList","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"base","type":"address"},{"internalType":"uint128","name":"newPrice","type":"uint128"},{"internalType":"uint64","name":"newSpread","type":"uint64"},{"internalType":"uint64","name":"newCoeff","type":"uint64"}],"name":"postState","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"bases","type":"address[]"},{"internalType":"uint128[]","name":"newPrices","type":"uint128[]"},{"internalType":"uint64[]","name":"newSpreads","type":"uint64[]"},{"internalType":"uint64[]","name":"newCoeffs","type":"uint64[]"}],"name":"postStateList","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"base","type":"address"}],"name":"price","outputs":[{"internalType":"uint256","name":"priceOut","type":"uint256"},{"internalType":"bool","name":"feasible","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"quoteToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"bool","name":"flag","type":"bool"}],"name":"setAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"_id","type":"uint8"},{"internalType":"address","name":"_base","type":"address"}],"name":"setBase","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint64","name":"_bound","type":"uint64"}],"name":"setBound","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"_oracle","type":"address"},{"internalType":"bool","name":"_cloPreferred","type":"bool"}],"name":"setCLOracle","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"bool","name":"_cloPreferred","type":"bool"}],"name":"setCloPreferred","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_quote","type":"address"},{"internalType":"address","name":"_oracle","type":"address"}],"name":"setQuoteToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newStaleDuration","type":"uint256"}],"name":"setStaleDuration","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_wooPP","type":"address"}],"name":"setWooPP","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"staleDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"base","type":"address"}],"name":"state","outputs":[{"components":[{"internalType":"uint128","name":"price","type":"uint128"},{"internalType":"uint64","name":"spread","type":"uint64"},{"internalType":"uint64","name":"coeff","type":"uint64"},{"internalType":"bool","name":"woFeasible","type":"bool"}],"internalType":"struct IWooracleV2.State","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"timestamp","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":[{"internalType":"address","name":"base","type":"address"}],"name":"woCoeff","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"base","type":"address"}],"name":"woPrice","outputs":[{"internalType":"uint128","name":"priceOut","type":"uint128"},{"internalType":"uint256","name":"priceTimestampOut","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"base","type":"address"}],"name":"woSpread","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"base","type":"address"}],"name":"woState","outputs":[{"components":[{"internalType":"uint128","name":"price","type":"uint128"},{"internalType":"uint64","name":"spread","type":"uint64"},{"internalType":"uint64","name":"coeff","type":"uint64"},{"internalType":"bool","name":"woFeasible","type":"bool"}],"internalType":"struct IWooracleV2.State","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"wooPP","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]Contract Creation Code
60806040523480156200001157600080fd5b506200001d3362000042565b61012c600555600680546001600160401b031916662386f26fc1000017905562000092565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b61388580620000a26000396000f3fe608060405234801561001057600080fd5b50600436106102ac5760003560e01c806399235fd41161017b578063c6ddb642116100d8578063d736ce7c1161008c578063f2030e7311610071578063f2030e7314610d1c578063f2fde38b14610dc1578063fddac0b914610dd4576102ac565b8063d736ce7c14610ce9578063e1a4e72a14610d09576102ac565b8063d09a568d116100bd578063d09a568d14610c55578063d449a83214610cb1578063d5bade0714610cd6576102ac565b8063c6ddb64214610ba2578063cc6864b114610c4c576102ac565b8063ba1eba681161012f578063c16116d411610114578063c16116d414610b28578063c32025a414610b3b578063c3c0993b14610b4e576102ac565b8063ba1eba6814610ae8578063be4df7d614610afb576102ac565b8063a4a2a8c511610160578063a4a2a8c514610a96578063aea9107814610aa9578063b80777ea14610ad1576102ac565b806399235fd414610a0e578063a2c5d01a14610a21576102ac565b806349230eab11610229578063715018a6116101dd5780637967d37e116101c25780637967d37e146109a45780638da5cb5b146109b757806396bb520f146109d5576102ac565b8063715018a61461098957806371ea920514610991576102ac565b80635ab2566c1161020e5780635ab2566c146109505780635bc9f65d146109635780636e27fcd614610976576102ac565b806349230eab1461092a5780634b0bddd21461093d576102ac565b80631ffabeb81161028057806324d7806c1161026557806324d7806c1461087b57806331e658a5146108ae57806337e257fd14610917576102ac565b80631ffabeb814610848578063217a4b701461085b576102ac565b806269dc6d146107985780630b7841f5146107f85780631142e7531461082057806318e0722114610835575b6000366060336102d160005473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff16148061030257503360009081526007602052604090205460ff165b61036d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f576f6f7261636c653a202141646d696e0000000000000000000000000000000060448201526064015b60405180910390fd5b81806103fb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f576f6f7261636c6556325f315f5a6970496e68657269743a202163616c6c646160448201527f74610000000000000000000000000000000000000000000000000000000000006064820152608401610364565b60008484600081811061041057610410612f9c565b919091013560f881901c925060fe1c9050603f8216600082900361057f5760008060005b8360ff168110156105735761049a8a8a61044f846005612ffa565b61045a906001613037565b90610466856005612ffa565b610471906001613037565b61047c906001613037565b926104899392919061304f565b61049291613079565b60f81c610de7565b92506105028a8a6104ac846005612ffa565b6104b7906001613037565b6104c2906001613037565b906104ce856005612ffa565b6104d9906001613037565b6104e4906005613037565b926104f19392919061304f565b6104fa916130c1565b60e01c610eb6565b73ffffffffffffffffffffffffffffffffffffffff8416600090815260016020526040902080547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166fffffffffffffffffffffffffffffffff8316179055915061056c81613107565b9050610434565b50504260045550610789565b8160ff166001036107895760008060008060005b8560ff1681101561077a576105c58c8c6105ae846009612ffa565b6105b9906001613037565b90610466856009612ffa565b94506105f98c8c6105d7846009612ffa565b6105e2906001613037565b6105ed906001613037565b906104ce856009612ffa565b93506106618c8c61060b846009612ffa565b610616906001613037565b610621906005613037565b9061062d856009612ffa565b610638906001613037565b610643906007613037565b926106509392919061304f565b6106599161313f565b60f01c610ee0565b92506106ab8c8c610673846009612ffa565b61067e906001613037565b610689906007613037565b90610695856009612ffa565b6106a0906001613037565b610643906009613037565b73ffffffffffffffffffffffffffffffffffffffff86166000908152600160205260409020805467ffffffffffffffff838116700100000000000000000000000000000000027fffffffffffffffff0000000000000000ffffffffffffffffffffffffffffffff91881678010000000000000000000000000000000000000000000000000277ffffffffffffffff000000000000000000000000000000009093166fffffffffffffffffffffffffffffffff8a16179290921716179055915061077381613107565b9050610593565b50504260045550610789915050565b50505050915050805190602001f35b6107ce6107a6366004613194565b60096020526000908152604090205473ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b61080b6108063660046131da565b610f02565b604080519283526020830191909152016107ef565b61083361082e36600461320d565b610f34565b005b61083361084336600461326d565b610f77565b6108336108563660046132e7565b61117b565b6003546107ce9073ffffffffffffffffffffffffffffffffffffffff1681565b61089e6108893660046131da565b60076020526000908152604090205460ff1681565b60405190151581526020016107ef565b6108c16108bc3660046131da565b6112a1565b6040805182516fffffffffffffffffffffffffffffffff16815260208084015167ffffffffffffffff908116918301919091528383015116918101919091526060918201511515918101919091526080016107ef565b61089e6109253660046131da565b6113bf565b61083361093836600461326d565b611419565b61083361094b3660046132e7565b611604565b6107ce61095e366004613194565b610de7565b6108336109713660046131da565b611662565b61083361098436600461331e565b611760565b61083361193b565b61083361099f366004613371565b61194f565b6108336109b23660046133c5565b611acd565b60005473ffffffffffffffffffffffffffffffffffffffff166107ce565b6107ce6109e33660046131da565b73ffffffffffffffffffffffffffffffffffffffff9081166000908152600260205260409020541690565b610833610a1c366004613489565b611d0e565b610a6e610a2f3660046131da565b73ffffffffffffffffffffffffffffffffffffffff166000908152600160205260409020546004546fffffffffffffffffffffffffffffffff90911691565b604080516fffffffffffffffffffffffffffffffff90931683526020830191909152016107ef565b610833610aa43660046134a2565b611dca565b610abc610ab73660046131da565b611fdb565b604080519283529015156020830152016107ef565b610ada60045481565b6040519081526020016107ef565b610833610af63660046134e9565b61215c565b600654610b0f9067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020016107ef565b6108c1610b363660046131da565b61228a565b610833610b49366004613513565b61238f565b610b0f610b5c3660046131da565b73ffffffffffffffffffffffffffffffffffffffff16600090815260016020526040902054700100000000000000000000000000000000900467ffffffffffffffff1690565b610c13610bb03660046131da565b6001602052600090815260409020546fffffffffffffffffffffffffffffffff81169067ffffffffffffffff7001000000000000000000000000000000008204811691780100000000000000000000000000000000000000000000000090041683565b604080516fffffffffffffffffffffffffffffffff909416845267ffffffffffffffff92831660208501529116908201526060016107ef565b610ada60055481565b610b0f610c633660046131da565b73ffffffffffffffffffffffffffffffffffffffff166000908152600160205260409020547801000000000000000000000000000000000000000000000000900467ffffffffffffffff1690565b610cc4610cbf3660046131da565b61254c565b60405160ff90911681526020016107ef565b610833610ce4366004613531565b61259b565b6008546107ce9073ffffffffffffffffffffffffffffffffffffffff1681565b610833610d173660046131da565b6126c5565b610d8b610d2a3660046131da565b60026020526000908152604090205473ffffffffffffffffffffffffffffffffffffffff81169060ff740100000000000000000000000000000000000000008204811691750100000000000000000000000000000000000000000090041683565b6040805173ffffffffffffffffffffffffffffffffffffffff909416845260ff90921660208401521515908201526060016107ef565b610833610dcf3660046131da565b612858565b610833610de2366004613531565b61290c565b604080516080810182527353000000000000000000000000000000000000048152733c1bca5a656e69edcd0d4e36bebb3fcdaca60cf160208201527306efdbff2a14a7c8e15944d1f4a48f9f95f663a49181019190915273f55bec9cafdbe8730f096aa55dad6d22d44099df6060820152600090600460ff841610610e945760ff831660009081526009602052604090205473ffffffffffffffffffffffffffffffffffffffff16610eaf565b808360ff1660048110610ea957610ea9612f9c565b60200201515b9392505050565b6000610ec6601f8316600a61367b565b610eda906307ffffff600585901c16612ffa565b92915050565b6000610ef0601f8316600a61368d565b610eda906107ff600585901c16612ffa565b6003546000908190610f2b90849073ffffffffffffffffffffffffffffffffffffffff16612a2e565b91509150915091565b610f3c612c01565b600680547fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000001667ffffffffffffffff92909216919091179055565b33610f9760005473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff161480610fc857503360009081526007602052604090205460ff165b61102e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f576f6f7261636c653a202141646d696e000000000000000000000000000000006044820152606401610364565b82818114611098576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f576f6f7261636c653a206c656e6774685f494e56414c494400000000000000006044820152606401610364565b60005b8181101561116f578383828181106110b5576110b5612f9c565b90506020020160208101906110ca919061320d565b600160008888858181106110e0576110e0612f9c565b90506020020160208101906110f591906131da565b73ffffffffffffffffffffffffffffffffffffffff1681526020810191909152604001600020805467ffffffffffffffff9290921678010000000000000000000000000000000000000000000000000277ffffffffffffffffffffffffffffffffffffffffffffffff90921691909117905560010161109b565b50504260045550505050565b3361119b60005473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff1614806111cc57503360009081526007602052604090205460ff165b611232576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f576f6f7261636c653a202141646d696e000000000000000000000000000000006044820152606401610364565b73ffffffffffffffffffffffffffffffffffffffff909116600090815260026020526040902080549115157501000000000000000000000000000000000000000000027fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff909216919091179055565b60408051608081018252600080825260208201819052918101829052606081019190915273ffffffffffffffffffffffffffffffffffffffff82166000908152600160209081526040808320815160608101835290546fffffffffffffffffffffffffffffffff8116825267ffffffffffffffff70010000000000000000000000000000000082048116948301949094527801000000000000000000000000000000000000000000000000900490921690820152908061136085611fdb565b915091506040518060800160405280836fffffffffffffffffffffffffffffffff168152602001846040015167ffffffffffffffff168152602001846020015167ffffffffffffffff1681526020018215158152509350505050919050565b73ffffffffffffffffffffffffffffffffffffffff81166000908152600160205260408120546fffffffffffffffffffffffffffffffff1615801590610eda57506005546004546114109190613037565b42111592915050565b3361143960005473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff16148061146a57503360009081526007602052604090205460ff165b6114d0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f576f6f7261636c653a202141646d696e000000000000000000000000000000006044820152606401610364565b8281811461153a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f576f6f7261636c653a206c656e6774685f494e56414c494400000000000000006044820152606401610364565b60005b8181101561116f5783838281811061155757611557612f9c565b905060200201602081019061156c919061369d565b6001600088888581811061158257611582612f9c565b905060200201602081019061159791906131da565b73ffffffffffffffffffffffffffffffffffffffff168152602081019190915260400160002080547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166fffffffffffffffffffffffffffffffff9290921691909117905560010161153d565b61160c612c01565b73ffffffffffffffffffffffffffffffffffffffff91909116600090815260076020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055565b3361168260005473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff1614806116b357503360009081526007602052604090205460ff165b611719576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f576f6f7261636c653a202141646d696e000000000000000000000000000000006044820152606401610364565b600880547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b3361178060005473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff1614806117b157503360009081526007602052604090205460ff165b611817576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f576f6f7261636c653a202141646d696e000000000000000000000000000000006044820152606401610364565b6003805473ffffffffffffffffffffffffffffffffffffffff8085167fffffffffffffffffffffffff000000000000000000000000000000000000000092831681179093556000928352600260209081526040938490208054928616929093168217835583517f313ce56700000000000000000000000000000000000000000000000000000000815293519293919263313ce5679260048082019392918290030181865afa1580156118cd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118f191906136b8565b815460ff9190911674010000000000000000000000000000000000000000027fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff9091161790555050565b611943612c01565b61194d6000612c82565b565b3361196f60005473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff1614806119a057503360009081526007602052604090205460ff165b611a06576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f576f6f7261636c653a202141646d696e000000000000000000000000000000006044820152606401610364565b73ffffffffffffffffffffffffffffffffffffffff84166000908152600160205260409020805467ffffffffffffffff838116700100000000000000000000000000000000027fffffffffffffffff0000000000000000ffffffffffffffffffffffffffffffff91861678010000000000000000000000000000000000000000000000000277ffffffffffffffff000000000000000000000000000000009093166fffffffffffffffffffffffffffffffff88161792909217161790555050426004555050565b33611aed60005473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff161480611b1e57503360009081526007602052604090205460ff165b611b84576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f576f6f7261636c653a202141646d696e000000000000000000000000000000006044820152606401610364565b8660005b81811015611cfe57611cf68a8a83818110611ba557611ba5612f9c565b9050602002016020810190611bba91906131da565b898984818110611bcc57611bcc612f9c565b9050602002016020810190611be1919061369d565b888885818110611bf357611bf3612f9c565b9050602002016020810190611c08919061320d565b878786818110611c1a57611c1a612f9c565b9050602002016020810190611c2f919061320d565b73ffffffffffffffffffffffffffffffffffffffff93909316600090815260016020526040902080546fffffffffffffffffffffffffffffffff9390931677ffffffffffffffff0000000000000000000000000000000090931692909217780100000000000000000000000000000000000000000000000067ffffffffffffffff92831602177fffffffffffffffff0000000000000000ffffffffffffffffffffffffffffffff167001000000000000000000000000000000009190931602919091179055565b600101611b88565b5050426004555050505050505050565b33611d2e60005473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff161480611d5f57503360009081526007602052604090205460ff165b611dc5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f576f6f7261636c653a202141646d696e000000000000000000000000000000006044820152606401610364565b600555565b33611dea60005473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff161480611e1b57503360009081526007602052604090205460ff165b611e81576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f576f6f7261636c653a202141646d696e000000000000000000000000000000006044820152606401610364565b73ffffffffffffffffffffffffffffffffffffffff83811660009081526002602090815260409182902080547fffffffffffffffffffffffff000000000000000000000000000000000000000016938616938417815582517f313ce567000000000000000000000000000000000000000000000000000000008152925190939263313ce5679260048083019391928290030181865afa158015611f28573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f4c91906136b8565b81547fffffffffffffffffffff0000ffffffffffffffffffffffffffffffffffffffff167401000000000000000000000000000000000000000060ff92909216919091027fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff16177501000000000000000000000000000000000000000000921515929092029190911790555050565b73ffffffffffffffffffffffffffffffffffffffff808216600090815260016020526040812054600454600354929384936fffffffffffffffffffffffffffffffff90931692849161202f91889116612a2e565b5090506000831580159061204f575060055461204b9084613037565b4211155b905060008215806120e857506006548590670de0b6b3a76400009061207e9067ffffffffffffffff16826136d5565b6120929067ffffffffffffffff1686612ffa565b61209c91906136fe565b111580156120e85750600654670de0b6b3a7640000906120c69067ffffffffffffffff1682613739565b6120da9067ffffffffffffffff1685612ffa565b6120e491906136fe565b8511155b905081156120fb57849650809550612152565b73ffffffffffffffffffffffffffffffffffffffff88166000908152600260205260409020547501000000000000000000000000000000000000000000900460ff1661214857600061214a565b825b965086151595505b5050505050915091565b3361217c60005473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff1614806121ad57503360009081526007602052604090205460ff165b612213576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f576f6f7261636c653a202141646d696e000000000000000000000000000000006044820152606401610364565b73ffffffffffffffffffffffffffffffffffffffff9091166000908152600160205260409020805467ffffffffffffffff90921678010000000000000000000000000000000000000000000000000277ffffffffffffffffffffffffffffffffffffffffffffffff90921691909117905542600455565b604080516080808201835260008083526020808401829052838501829052606080850183905273ffffffffffffffffffffffffffffffffffffffff8716835260018252918590208551808401875290546fffffffffffffffffffffffffffffffff808216835267ffffffffffffffff7001000000000000000000000000000000008304811684860190815278010000000000000000000000000000000000000000000000009093048116848a0190815289519788018a5284518316885251811694870194909452905190921695840195909552845193949391830191161580159061238457506005546004546123809190613037565b4211155b151590529392505050565b336123af60005473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff1614806123e057503360009081526007602052604090205460ff165b612446576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f576f6f7261636c653a202141646d696e000000000000000000000000000000006044820152606401610364565b600061245183610de7565b73ffffffffffffffffffffffffffffffffffffffff16146124f4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602860248201527f576f6f7261636c6556325f315f5a6970496e68657269743a202169645f53455460448201527f5f414c52454144590000000000000000000000000000000000000000000000006064820152608401610364565b60ff91909116600090815260096020526040902080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff909216919091179055565b73ffffffffffffffffffffffffffffffffffffffff811660009081526002602052604081205474010000000000000000000000000000000000000000900460ff16808203610eda576008610eaf565b336125bb60005473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff1614806125ec57503360009081526007602052604090205460ff165b612652576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f576f6f7261636c653a202141646d696e000000000000000000000000000000006044820152606401610364565b73ffffffffffffffffffffffffffffffffffffffff828116600090815260016020526040902080547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166fffffffffffffffffffffffffffffffff84161790556008541633146126c157426004555b5050565b336126e560005473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff16148061271657503360009081526007602052604090205460ff165b61277c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f576f6f7261636c653a202141646d696e000000000000000000000000000000006044820152606401610364565b73ffffffffffffffffffffffffffffffffffffffff811673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee036127ba576127b73347612cf7565b50565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015260009073ffffffffffffffffffffffffffffffffffffffff8316906370a0823190602401602060405180830381865afa158015612827573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061284b9190613765565b90506126c1823383612e06565b612860612c01565b73ffffffffffffffffffffffffffffffffffffffff8116612903576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610364565b6127b781612c82565b3361292c60005473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff16148061295d57503360009081526007602052604090205460ff165b6129c3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f576f6f7261636c653a202141646d696e000000000000000000000000000000006044820152606401610364565b73ffffffffffffffffffffffffffffffffffffffff91909116600090815260016020526040902080547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166fffffffffffffffffffffffffffffffff90921691909117905542600455565b73ffffffffffffffffffffffffffffffffffffffff808316600090815260026020526040812054909182911680612a6c576000809250925050612bfa565b73ffffffffffffffffffffffffffffffffffffffff8481166000908152600260205260408082205481517ffeaf968c0000000000000000000000000000000000000000000000000000000081529151818516947401000000000000000000000000000000000000000090920460ff169392839287169163feaf968c9160048082019260a0929091908290030181865afa158015612b0d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b319190613798565b509350509250506000808573ffffffffffffffffffffffffffffffffffffffff1663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa158015612b86573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612baa9190613798565b509194509092508591508390506000612bc488600a6137e8565b905081612bd18285612ffa565b612bdb91906136fe565b9b5083861015612beb5785612bed565b835b9a50505050505050505050505b9250929050565b60005473ffffffffffffffffffffffffffffffffffffffff16331461194d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610364565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6040805160008082526020820190925273ffffffffffffffffffffffffffffffffffffffff8416908390604051612d2e91906137f7565b60006040518083038185875af1925050503d8060008114612d6b576040519150601f19603f3d011682016040523d82523d6000602084013e612d70565b606091505b5050905080612e01576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603460248201527f5472616e7366657248656c7065723a3a736166655472616e736665724554483a60448201527f20455448207472616e73666572206661696c65640000000000000000000000006064820152608401610364565b505050565b6040805173ffffffffffffffffffffffffffffffffffffffff8481166024830152604480830185905283518084039091018152606490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb000000000000000000000000000000000000000000000000000000001790529151600092839290871691612e9d91906137f7565b6000604051808303816000865af19150503d8060008114612eda576040519150601f19603f3d011682016040523d82523d6000602084013e612edf565b606091505b5091509150818015612f09575080511580612f09575080806020019051810190612f099190613832565b612f95576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f5472616e7366657248656c7065723a3a736166655472616e736665723a20747260448201527f616e73666572206661696c6564000000000000000000000000000000000000006064820152608401610364565b5050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561303257613032612fcb565b500290565b6000821982111561304a5761304a612fcb565b500190565b6000808585111561305f57600080fd5b8386111561306c57600080fd5b5050820193919092039150565b7fff0000000000000000000000000000000000000000000000000000000000000081358181169160018510156130b95780818660010360031b1b83161692505b505092915050565b7fffffffff0000000000000000000000000000000000000000000000000000000081358181169160048510156130b95760049490940360031b84901b1690921692915050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361313857613138612fcb565b5060010190565b7fffff00000000000000000000000000000000000000000000000000000000000081358181169160028510156130b95760029490940360031b84901b1690921692915050565b60ff811681146127b757600080fd5b6000602082840312156131a657600080fd5b8135610eaf81613185565b803573ffffffffffffffffffffffffffffffffffffffff811681146131d557600080fd5b919050565b6000602082840312156131ec57600080fd5b610eaf826131b1565b803567ffffffffffffffff811681146131d557600080fd5b60006020828403121561321f57600080fd5b610eaf826131f5565b60008083601f84011261323a57600080fd5b50813567ffffffffffffffff81111561325257600080fd5b6020830191508360208260051b8501011115612bfa57600080fd5b6000806000806040858703121561328357600080fd5b843567ffffffffffffffff8082111561329b57600080fd5b6132a788838901613228565b909650945060208701359150808211156132c057600080fd5b506132cd87828801613228565b95989497509550505050565b80151581146127b757600080fd5b600080604083850312156132fa57600080fd5b613303836131b1565b91506020830135613313816132d9565b809150509250929050565b6000806040838503121561333157600080fd5b61333a836131b1565b9150613348602084016131b1565b90509250929050565b80356fffffffffffffffffffffffffffffffff811681146131d557600080fd5b6000806000806080858703121561338757600080fd5b613390856131b1565b935061339e60208601613351565b92506133ac604086016131f5565b91506133ba606086016131f5565b905092959194509250565b6000806000806000806000806080898b0312156133e157600080fd5b883567ffffffffffffffff808211156133f957600080fd5b6134058c838d01613228565b909a50985060208b013591508082111561341e57600080fd5b61342a8c838d01613228565b909850965060408b013591508082111561344357600080fd5b61344f8c838d01613228565b909650945060608b013591508082111561346857600080fd5b506134758b828c01613228565b999c989b5096995094979396929594505050565b60006020828403121561349b57600080fd5b5035919050565b6000806000606084860312156134b757600080fd5b6134c0846131b1565b92506134ce602085016131b1565b915060408401356134de816132d9565b809150509250925092565b600080604083850312156134fc57600080fd5b613505836131b1565b9150613348602084016131f5565b6000806040838503121561352657600080fd5b823561333a81613185565b6000806040838503121561354457600080fd5b61354d836131b1565b915061334860208401613351565b600181815b808511156135b457817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0482111561359a5761359a612fcb565b808516156135a757918102915b93841c9390800290613560565b509250929050565b6000826135cb57506001610eda565b816135d857506000610eda565b81600181146135ee57600281146135f857613614565b6001915050610eda565b60ff84111561360957613609612fcb565b50506001821b610eda565b5060208310610133831016604e8410600b8410161715613637575081810a610eda565b613641838361355b565b807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0482111561367357613673612fcb565b029392505050565b6000610eaf63ffffffff8416836135bc565b6000610eaf61ffff8416836135bc565b6000602082840312156136af57600080fd5b610eaf82613351565b6000602082840312156136ca57600080fd5b8151610eaf81613185565b600067ffffffffffffffff838116908316818110156136f6576136f6612fcb565b039392505050565b600082613734577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b600067ffffffffffffffff80831681851680830382111561375c5761375c612fcb565b01949350505050565b60006020828403121561377757600080fd5b5051919050565b805169ffffffffffffffffffff811681146131d557600080fd5b600080600080600060a086880312156137b057600080fd5b6137b98661377e565b94506020860151935060408601519250606086015191506137dc6080870161377e565b90509295509295909350565b6000610eaf60ff8416836135bc565b6000825160005b8181101561381857602081860181015185830152016137fe565b81811115613827576000828501525b509190910192915050565b60006020828403121561384457600080fd5b8151610eaf816132d956fea264697066735822122072c9ca9cd7ecc94031f24857a7de42169fac530e7c16796f893d54cef6a6682664736f6c634300080e0033
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106102ac5760003560e01c806399235fd41161017b578063c6ddb642116100d8578063d736ce7c1161008c578063f2030e7311610071578063f2030e7314610d1c578063f2fde38b14610dc1578063fddac0b914610dd4576102ac565b8063d736ce7c14610ce9578063e1a4e72a14610d09576102ac565b8063d09a568d116100bd578063d09a568d14610c55578063d449a83214610cb1578063d5bade0714610cd6576102ac565b8063c6ddb64214610ba2578063cc6864b114610c4c576102ac565b8063ba1eba681161012f578063c16116d411610114578063c16116d414610b28578063c32025a414610b3b578063c3c0993b14610b4e576102ac565b8063ba1eba6814610ae8578063be4df7d614610afb576102ac565b8063a4a2a8c511610160578063a4a2a8c514610a96578063aea9107814610aa9578063b80777ea14610ad1576102ac565b806399235fd414610a0e578063a2c5d01a14610a21576102ac565b806349230eab11610229578063715018a6116101dd5780637967d37e116101c25780637967d37e146109a45780638da5cb5b146109b757806396bb520f146109d5576102ac565b8063715018a61461098957806371ea920514610991576102ac565b80635ab2566c1161020e5780635ab2566c146109505780635bc9f65d146109635780636e27fcd614610976576102ac565b806349230eab1461092a5780634b0bddd21461093d576102ac565b80631ffabeb81161028057806324d7806c1161026557806324d7806c1461087b57806331e658a5146108ae57806337e257fd14610917576102ac565b80631ffabeb814610848578063217a4b701461085b576102ac565b806269dc6d146107985780630b7841f5146107f85780631142e7531461082057806318e0722114610835575b6000366060336102d160005473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff16148061030257503360009081526007602052604090205460ff165b61036d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f576f6f7261636c653a202141646d696e0000000000000000000000000000000060448201526064015b60405180910390fd5b81806103fb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f576f6f7261636c6556325f315f5a6970496e68657269743a202163616c6c646160448201527f74610000000000000000000000000000000000000000000000000000000000006064820152608401610364565b60008484600081811061041057610410612f9c565b919091013560f881901c925060fe1c9050603f8216600082900361057f5760008060005b8360ff168110156105735761049a8a8a61044f846005612ffa565b61045a906001613037565b90610466856005612ffa565b610471906001613037565b61047c906001613037565b926104899392919061304f565b61049291613079565b60f81c610de7565b92506105028a8a6104ac846005612ffa565b6104b7906001613037565b6104c2906001613037565b906104ce856005612ffa565b6104d9906001613037565b6104e4906005613037565b926104f19392919061304f565b6104fa916130c1565b60e01c610eb6565b73ffffffffffffffffffffffffffffffffffffffff8416600090815260016020526040902080547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166fffffffffffffffffffffffffffffffff8316179055915061056c81613107565b9050610434565b50504260045550610789565b8160ff166001036107895760008060008060005b8560ff1681101561077a576105c58c8c6105ae846009612ffa565b6105b9906001613037565b90610466856009612ffa565b94506105f98c8c6105d7846009612ffa565b6105e2906001613037565b6105ed906001613037565b906104ce856009612ffa565b93506106618c8c61060b846009612ffa565b610616906001613037565b610621906005613037565b9061062d856009612ffa565b610638906001613037565b610643906007613037565b926106509392919061304f565b6106599161313f565b60f01c610ee0565b92506106ab8c8c610673846009612ffa565b61067e906001613037565b610689906007613037565b90610695856009612ffa565b6106a0906001613037565b610643906009613037565b73ffffffffffffffffffffffffffffffffffffffff86166000908152600160205260409020805467ffffffffffffffff838116700100000000000000000000000000000000027fffffffffffffffff0000000000000000ffffffffffffffffffffffffffffffff91881678010000000000000000000000000000000000000000000000000277ffffffffffffffff000000000000000000000000000000009093166fffffffffffffffffffffffffffffffff8a16179290921716179055915061077381613107565b9050610593565b50504260045550610789915050565b50505050915050805190602001f35b6107ce6107a6366004613194565b60096020526000908152604090205473ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b61080b6108063660046131da565b610f02565b604080519283526020830191909152016107ef565b61083361082e36600461320d565b610f34565b005b61083361084336600461326d565b610f77565b6108336108563660046132e7565b61117b565b6003546107ce9073ffffffffffffffffffffffffffffffffffffffff1681565b61089e6108893660046131da565b60076020526000908152604090205460ff1681565b60405190151581526020016107ef565b6108c16108bc3660046131da565b6112a1565b6040805182516fffffffffffffffffffffffffffffffff16815260208084015167ffffffffffffffff908116918301919091528383015116918101919091526060918201511515918101919091526080016107ef565b61089e6109253660046131da565b6113bf565b61083361093836600461326d565b611419565b61083361094b3660046132e7565b611604565b6107ce61095e366004613194565b610de7565b6108336109713660046131da565b611662565b61083361098436600461331e565b611760565b61083361193b565b61083361099f366004613371565b61194f565b6108336109b23660046133c5565b611acd565b60005473ffffffffffffffffffffffffffffffffffffffff166107ce565b6107ce6109e33660046131da565b73ffffffffffffffffffffffffffffffffffffffff9081166000908152600260205260409020541690565b610833610a1c366004613489565b611d0e565b610a6e610a2f3660046131da565b73ffffffffffffffffffffffffffffffffffffffff166000908152600160205260409020546004546fffffffffffffffffffffffffffffffff90911691565b604080516fffffffffffffffffffffffffffffffff90931683526020830191909152016107ef565b610833610aa43660046134a2565b611dca565b610abc610ab73660046131da565b611fdb565b604080519283529015156020830152016107ef565b610ada60045481565b6040519081526020016107ef565b610833610af63660046134e9565b61215c565b600654610b0f9067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020016107ef565b6108c1610b363660046131da565b61228a565b610833610b49366004613513565b61238f565b610b0f610b5c3660046131da565b73ffffffffffffffffffffffffffffffffffffffff16600090815260016020526040902054700100000000000000000000000000000000900467ffffffffffffffff1690565b610c13610bb03660046131da565b6001602052600090815260409020546fffffffffffffffffffffffffffffffff81169067ffffffffffffffff7001000000000000000000000000000000008204811691780100000000000000000000000000000000000000000000000090041683565b604080516fffffffffffffffffffffffffffffffff909416845267ffffffffffffffff92831660208501529116908201526060016107ef565b610ada60055481565b610b0f610c633660046131da565b73ffffffffffffffffffffffffffffffffffffffff166000908152600160205260409020547801000000000000000000000000000000000000000000000000900467ffffffffffffffff1690565b610cc4610cbf3660046131da565b61254c565b60405160ff90911681526020016107ef565b610833610ce4366004613531565b61259b565b6008546107ce9073ffffffffffffffffffffffffffffffffffffffff1681565b610833610d173660046131da565b6126c5565b610d8b610d2a3660046131da565b60026020526000908152604090205473ffffffffffffffffffffffffffffffffffffffff81169060ff740100000000000000000000000000000000000000008204811691750100000000000000000000000000000000000000000090041683565b6040805173ffffffffffffffffffffffffffffffffffffffff909416845260ff90921660208401521515908201526060016107ef565b610833610dcf3660046131da565b612858565b610833610de2366004613531565b61290c565b604080516080810182527353000000000000000000000000000000000000048152733c1bca5a656e69edcd0d4e36bebb3fcdaca60cf160208201527306efdbff2a14a7c8e15944d1f4a48f9f95f663a49181019190915273f55bec9cafdbe8730f096aa55dad6d22d44099df6060820152600090600460ff841610610e945760ff831660009081526009602052604090205473ffffffffffffffffffffffffffffffffffffffff16610eaf565b808360ff1660048110610ea957610ea9612f9c565b60200201515b9392505050565b6000610ec6601f8316600a61367b565b610eda906307ffffff600585901c16612ffa565b92915050565b6000610ef0601f8316600a61368d565b610eda906107ff600585901c16612ffa565b6003546000908190610f2b90849073ffffffffffffffffffffffffffffffffffffffff16612a2e565b91509150915091565b610f3c612c01565b600680547fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000001667ffffffffffffffff92909216919091179055565b33610f9760005473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff161480610fc857503360009081526007602052604090205460ff165b61102e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f576f6f7261636c653a202141646d696e000000000000000000000000000000006044820152606401610364565b82818114611098576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f576f6f7261636c653a206c656e6774685f494e56414c494400000000000000006044820152606401610364565b60005b8181101561116f578383828181106110b5576110b5612f9c565b90506020020160208101906110ca919061320d565b600160008888858181106110e0576110e0612f9c565b90506020020160208101906110f591906131da565b73ffffffffffffffffffffffffffffffffffffffff1681526020810191909152604001600020805467ffffffffffffffff9290921678010000000000000000000000000000000000000000000000000277ffffffffffffffffffffffffffffffffffffffffffffffff90921691909117905560010161109b565b50504260045550505050565b3361119b60005473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff1614806111cc57503360009081526007602052604090205460ff165b611232576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f576f6f7261636c653a202141646d696e000000000000000000000000000000006044820152606401610364565b73ffffffffffffffffffffffffffffffffffffffff909116600090815260026020526040902080549115157501000000000000000000000000000000000000000000027fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff909216919091179055565b60408051608081018252600080825260208201819052918101829052606081019190915273ffffffffffffffffffffffffffffffffffffffff82166000908152600160209081526040808320815160608101835290546fffffffffffffffffffffffffffffffff8116825267ffffffffffffffff70010000000000000000000000000000000082048116948301949094527801000000000000000000000000000000000000000000000000900490921690820152908061136085611fdb565b915091506040518060800160405280836fffffffffffffffffffffffffffffffff168152602001846040015167ffffffffffffffff168152602001846020015167ffffffffffffffff1681526020018215158152509350505050919050565b73ffffffffffffffffffffffffffffffffffffffff81166000908152600160205260408120546fffffffffffffffffffffffffffffffff1615801590610eda57506005546004546114109190613037565b42111592915050565b3361143960005473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff16148061146a57503360009081526007602052604090205460ff165b6114d0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f576f6f7261636c653a202141646d696e000000000000000000000000000000006044820152606401610364565b8281811461153a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f576f6f7261636c653a206c656e6774685f494e56414c494400000000000000006044820152606401610364565b60005b8181101561116f5783838281811061155757611557612f9c565b905060200201602081019061156c919061369d565b6001600088888581811061158257611582612f9c565b905060200201602081019061159791906131da565b73ffffffffffffffffffffffffffffffffffffffff168152602081019190915260400160002080547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166fffffffffffffffffffffffffffffffff9290921691909117905560010161153d565b61160c612c01565b73ffffffffffffffffffffffffffffffffffffffff91909116600090815260076020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055565b3361168260005473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff1614806116b357503360009081526007602052604090205460ff165b611719576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f576f6f7261636c653a202141646d696e000000000000000000000000000000006044820152606401610364565b600880547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b3361178060005473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff1614806117b157503360009081526007602052604090205460ff165b611817576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f576f6f7261636c653a202141646d696e000000000000000000000000000000006044820152606401610364565b6003805473ffffffffffffffffffffffffffffffffffffffff8085167fffffffffffffffffffffffff000000000000000000000000000000000000000092831681179093556000928352600260209081526040938490208054928616929093168217835583517f313ce56700000000000000000000000000000000000000000000000000000000815293519293919263313ce5679260048082019392918290030181865afa1580156118cd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118f191906136b8565b815460ff9190911674010000000000000000000000000000000000000000027fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff9091161790555050565b611943612c01565b61194d6000612c82565b565b3361196f60005473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff1614806119a057503360009081526007602052604090205460ff165b611a06576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f576f6f7261636c653a202141646d696e000000000000000000000000000000006044820152606401610364565b73ffffffffffffffffffffffffffffffffffffffff84166000908152600160205260409020805467ffffffffffffffff838116700100000000000000000000000000000000027fffffffffffffffff0000000000000000ffffffffffffffffffffffffffffffff91861678010000000000000000000000000000000000000000000000000277ffffffffffffffff000000000000000000000000000000009093166fffffffffffffffffffffffffffffffff88161792909217161790555050426004555050565b33611aed60005473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff161480611b1e57503360009081526007602052604090205460ff165b611b84576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f576f6f7261636c653a202141646d696e000000000000000000000000000000006044820152606401610364565b8660005b81811015611cfe57611cf68a8a83818110611ba557611ba5612f9c565b9050602002016020810190611bba91906131da565b898984818110611bcc57611bcc612f9c565b9050602002016020810190611be1919061369d565b888885818110611bf357611bf3612f9c565b9050602002016020810190611c08919061320d565b878786818110611c1a57611c1a612f9c565b9050602002016020810190611c2f919061320d565b73ffffffffffffffffffffffffffffffffffffffff93909316600090815260016020526040902080546fffffffffffffffffffffffffffffffff9390931677ffffffffffffffff0000000000000000000000000000000090931692909217780100000000000000000000000000000000000000000000000067ffffffffffffffff92831602177fffffffffffffffff0000000000000000ffffffffffffffffffffffffffffffff167001000000000000000000000000000000009190931602919091179055565b600101611b88565b5050426004555050505050505050565b33611d2e60005473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff161480611d5f57503360009081526007602052604090205460ff165b611dc5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f576f6f7261636c653a202141646d696e000000000000000000000000000000006044820152606401610364565b600555565b33611dea60005473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff161480611e1b57503360009081526007602052604090205460ff165b611e81576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f576f6f7261636c653a202141646d696e000000000000000000000000000000006044820152606401610364565b73ffffffffffffffffffffffffffffffffffffffff83811660009081526002602090815260409182902080547fffffffffffffffffffffffff000000000000000000000000000000000000000016938616938417815582517f313ce567000000000000000000000000000000000000000000000000000000008152925190939263313ce5679260048083019391928290030181865afa158015611f28573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f4c91906136b8565b81547fffffffffffffffffffff0000ffffffffffffffffffffffffffffffffffffffff167401000000000000000000000000000000000000000060ff92909216919091027fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff16177501000000000000000000000000000000000000000000921515929092029190911790555050565b73ffffffffffffffffffffffffffffffffffffffff808216600090815260016020526040812054600454600354929384936fffffffffffffffffffffffffffffffff90931692849161202f91889116612a2e565b5090506000831580159061204f575060055461204b9084613037565b4211155b905060008215806120e857506006548590670de0b6b3a76400009061207e9067ffffffffffffffff16826136d5565b6120929067ffffffffffffffff1686612ffa565b61209c91906136fe565b111580156120e85750600654670de0b6b3a7640000906120c69067ffffffffffffffff1682613739565b6120da9067ffffffffffffffff1685612ffa565b6120e491906136fe565b8511155b905081156120fb57849650809550612152565b73ffffffffffffffffffffffffffffffffffffffff88166000908152600260205260409020547501000000000000000000000000000000000000000000900460ff1661214857600061214a565b825b965086151595505b5050505050915091565b3361217c60005473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff1614806121ad57503360009081526007602052604090205460ff165b612213576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f576f6f7261636c653a202141646d696e000000000000000000000000000000006044820152606401610364565b73ffffffffffffffffffffffffffffffffffffffff9091166000908152600160205260409020805467ffffffffffffffff90921678010000000000000000000000000000000000000000000000000277ffffffffffffffffffffffffffffffffffffffffffffffff90921691909117905542600455565b604080516080808201835260008083526020808401829052838501829052606080850183905273ffffffffffffffffffffffffffffffffffffffff8716835260018252918590208551808401875290546fffffffffffffffffffffffffffffffff808216835267ffffffffffffffff7001000000000000000000000000000000008304811684860190815278010000000000000000000000000000000000000000000000009093048116848a0190815289519788018a5284518316885251811694870194909452905190921695840195909552845193949391830191161580159061238457506005546004546123809190613037565b4211155b151590529392505050565b336123af60005473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff1614806123e057503360009081526007602052604090205460ff165b612446576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f576f6f7261636c653a202141646d696e000000000000000000000000000000006044820152606401610364565b600061245183610de7565b73ffffffffffffffffffffffffffffffffffffffff16146124f4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602860248201527f576f6f7261636c6556325f315f5a6970496e68657269743a202169645f53455460448201527f5f414c52454144590000000000000000000000000000000000000000000000006064820152608401610364565b60ff91909116600090815260096020526040902080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff909216919091179055565b73ffffffffffffffffffffffffffffffffffffffff811660009081526002602052604081205474010000000000000000000000000000000000000000900460ff16808203610eda576008610eaf565b336125bb60005473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff1614806125ec57503360009081526007602052604090205460ff165b612652576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f576f6f7261636c653a202141646d696e000000000000000000000000000000006044820152606401610364565b73ffffffffffffffffffffffffffffffffffffffff828116600090815260016020526040902080547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166fffffffffffffffffffffffffffffffff84161790556008541633146126c157426004555b5050565b336126e560005473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff16148061271657503360009081526007602052604090205460ff165b61277c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f576f6f7261636c653a202141646d696e000000000000000000000000000000006044820152606401610364565b73ffffffffffffffffffffffffffffffffffffffff811673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee036127ba576127b73347612cf7565b50565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015260009073ffffffffffffffffffffffffffffffffffffffff8316906370a0823190602401602060405180830381865afa158015612827573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061284b9190613765565b90506126c1823383612e06565b612860612c01565b73ffffffffffffffffffffffffffffffffffffffff8116612903576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610364565b6127b781612c82565b3361292c60005473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff16148061295d57503360009081526007602052604090205460ff165b6129c3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f576f6f7261636c653a202141646d696e000000000000000000000000000000006044820152606401610364565b73ffffffffffffffffffffffffffffffffffffffff91909116600090815260016020526040902080547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166fffffffffffffffffffffffffffffffff90921691909117905542600455565b73ffffffffffffffffffffffffffffffffffffffff808316600090815260026020526040812054909182911680612a6c576000809250925050612bfa565b73ffffffffffffffffffffffffffffffffffffffff8481166000908152600260205260408082205481517ffeaf968c0000000000000000000000000000000000000000000000000000000081529151818516947401000000000000000000000000000000000000000090920460ff169392839287169163feaf968c9160048082019260a0929091908290030181865afa158015612b0d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b319190613798565b509350509250506000808573ffffffffffffffffffffffffffffffffffffffff1663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa158015612b86573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612baa9190613798565b509194509092508591508390506000612bc488600a6137e8565b905081612bd18285612ffa565b612bdb91906136fe565b9b5083861015612beb5785612bed565b835b9a50505050505050505050505b9250929050565b60005473ffffffffffffffffffffffffffffffffffffffff16331461194d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610364565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6040805160008082526020820190925273ffffffffffffffffffffffffffffffffffffffff8416908390604051612d2e91906137f7565b60006040518083038185875af1925050503d8060008114612d6b576040519150601f19603f3d011682016040523d82523d6000602084013e612d70565b606091505b5050905080612e01576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603460248201527f5472616e7366657248656c7065723a3a736166655472616e736665724554483a60448201527f20455448207472616e73666572206661696c65640000000000000000000000006064820152608401610364565b505050565b6040805173ffffffffffffffffffffffffffffffffffffffff8481166024830152604480830185905283518084039091018152606490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb000000000000000000000000000000000000000000000000000000001790529151600092839290871691612e9d91906137f7565b6000604051808303816000865af19150503d8060008114612eda576040519150601f19603f3d011682016040523d82523d6000602084013e612edf565b606091505b5091509150818015612f09575080511580612f09575080806020019051810190612f099190613832565b612f95576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f5472616e7366657248656c7065723a3a736166655472616e736665723a20747260448201527f616e73666572206661696c6564000000000000000000000000000000000000006064820152608401610364565b5050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561303257613032612fcb565b500290565b6000821982111561304a5761304a612fcb565b500190565b6000808585111561305f57600080fd5b8386111561306c57600080fd5b5050820193919092039150565b7fff0000000000000000000000000000000000000000000000000000000000000081358181169160018510156130b95780818660010360031b1b83161692505b505092915050565b7fffffffff0000000000000000000000000000000000000000000000000000000081358181169160048510156130b95760049490940360031b84901b1690921692915050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361313857613138612fcb565b5060010190565b7fffff00000000000000000000000000000000000000000000000000000000000081358181169160028510156130b95760029490940360031b84901b1690921692915050565b60ff811681146127b757600080fd5b6000602082840312156131a657600080fd5b8135610eaf81613185565b803573ffffffffffffffffffffffffffffffffffffffff811681146131d557600080fd5b919050565b6000602082840312156131ec57600080fd5b610eaf826131b1565b803567ffffffffffffffff811681146131d557600080fd5b60006020828403121561321f57600080fd5b610eaf826131f5565b60008083601f84011261323a57600080fd5b50813567ffffffffffffffff81111561325257600080fd5b6020830191508360208260051b8501011115612bfa57600080fd5b6000806000806040858703121561328357600080fd5b843567ffffffffffffffff8082111561329b57600080fd5b6132a788838901613228565b909650945060208701359150808211156132c057600080fd5b506132cd87828801613228565b95989497509550505050565b80151581146127b757600080fd5b600080604083850312156132fa57600080fd5b613303836131b1565b91506020830135613313816132d9565b809150509250929050565b6000806040838503121561333157600080fd5b61333a836131b1565b9150613348602084016131b1565b90509250929050565b80356fffffffffffffffffffffffffffffffff811681146131d557600080fd5b6000806000806080858703121561338757600080fd5b613390856131b1565b935061339e60208601613351565b92506133ac604086016131f5565b91506133ba606086016131f5565b905092959194509250565b6000806000806000806000806080898b0312156133e157600080fd5b883567ffffffffffffffff808211156133f957600080fd5b6134058c838d01613228565b909a50985060208b013591508082111561341e57600080fd5b61342a8c838d01613228565b909850965060408b013591508082111561344357600080fd5b61344f8c838d01613228565b909650945060608b013591508082111561346857600080fd5b506134758b828c01613228565b999c989b5096995094979396929594505050565b60006020828403121561349b57600080fd5b5035919050565b6000806000606084860312156134b757600080fd5b6134c0846131b1565b92506134ce602085016131b1565b915060408401356134de816132d9565b809150509250925092565b600080604083850312156134fc57600080fd5b613505836131b1565b9150613348602084016131f5565b6000806040838503121561352657600080fd5b823561333a81613185565b6000806040838503121561354457600080fd5b61354d836131b1565b915061334860208401613351565b600181815b808511156135b457817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0482111561359a5761359a612fcb565b808516156135a757918102915b93841c9390800290613560565b509250929050565b6000826135cb57506001610eda565b816135d857506000610eda565b81600181146135ee57600281146135f857613614565b6001915050610eda565b60ff84111561360957613609612fcb565b50506001821b610eda565b5060208310610133831016604e8410600b8410161715613637575081810a610eda565b613641838361355b565b807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0482111561367357613673612fcb565b029392505050565b6000610eaf63ffffffff8416836135bc565b6000610eaf61ffff8416836135bc565b6000602082840312156136af57600080fd5b610eaf82613351565b6000602082840312156136ca57600080fd5b8151610eaf81613185565b600067ffffffffffffffff838116908316818110156136f6576136f6612fcb565b039392505050565b600082613734577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b600067ffffffffffffffff80831681851680830382111561375c5761375c612fcb565b01949350505050565b60006020828403121561377757600080fd5b5051919050565b805169ffffffffffffffffffff811681146131d557600080fd5b600080600080600060a086880312156137b057600080fd5b6137b98661377e565b94506020860151935060408601519250606086015191506137dc6080870161377e565b90509295509295909350565b6000610eaf60ff8416836135bc565b6000825160005b8181101561381857602081860181015185830152016137fe565b81811115613827576000828501525b509190910192915050565b60006020828403121561384457600080fd5b8151610eaf816132d956fea264697066735822122072c9ca9cd7ecc94031f24857a7de42169fac530e7c16796f893d54cef6a6682664736f6c634300080e0033
Loading...
Loading
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
Multichain Portfolio | 35 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.