Source Code
Overview
MON Balance
MON Value
$0.00View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
OrderStore
Compiler Version
v0.8.17+commit.8df45f5f
Optimization Enabled:
Yes with 200 runs
Other Settings:
london EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.17;
import "./EnumerableSet.sol";
import "./Roles.sol";
/// @title OrderStore
/// @notice Persistent storage for Orders.sol
contract OrderStore is Roles {
// Libraries
using EnumerableSet for EnumerableSet.UintSet;
// Order struct
struct Order {
uint256 orderId; // incremental order id
address user; // user that usubmitted the order
address asset; // Asset address, e.g. address(0) for ETH
string market; // Market this order was submitted on
uint256 margin; // Collateral tied to this order. In wei
uint256 size; // Order size (margin * leverage). In wei
uint256 price; // The order's price if its a trigger or protected order
uint256 fee; // Fee amount paid. In wei
bool isLong; // Wether the order is a buy or sell order
uint8 orderType; // 0 = market, 1 = limit, 2 = stop
bool isReduceOnly; // Wether the order is reduce-only
uint256 timestamp; // block.timestamp at which the order was submitted
uint256 expiry; // block.timestamp at which the order expires
uint256 cancelOrderId; // orderId to cancel when this order executes
}
uint256 public oid; // incremental order id
mapping(uint256 => Order) private orders; // order id => Order
mapping(address => EnumerableSet.UintSet) private userOrderIds; // user => [order ids..]
EnumerableSet.UintSet private marketOrderIds; // [order ids..]
EnumerableSet.UintSet private triggerOrderIds; // [order ids..]
uint256 public maxMarketOrderTTL;
uint256 public maxTriggerOrderTTL;
uint256 public chainlinkCooldown;
bool public areNewOrdersPaused;
bool public isProcessingPaused;
function initialize(address rs) external initializer {
roleStore = RoleStore(rs);
_setGov(msg.sender);
maxMarketOrderTTL = 5 minutes;
maxTriggerOrderTTL = 180 days;
chainlinkCooldown = 5 minutes;
}
// Setters
/// @notice Disable submitting new orders
/// @dev Only callable by governance
function setAreNewOrdersPaused(bool b) external onlyGov {
areNewOrdersPaused = b;
}
/// @notice Disable processing new orders
/// @dev Only callable by governance
function setIsProcessingPaused(bool b) external onlyGov {
isProcessingPaused = b;
}
/// @notice Set duration until market orders expire
/// @dev Only callable by governance
/// @param amount Duration in seconds
function setMaxMarketOrderTTL(uint256 amount) external onlyGov {
require(amount > 0, "!amount");
require(amount < maxTriggerOrderTTL, "amount > maxTriggerOrderTTL");
maxMarketOrderTTL = amount;
}
/// @notice Set duration until trigger orders expire
/// @dev Only callable by governance
/// @param amount Duration in seconds
function setMaxTriggerOrderTTL(uint256 amount) external onlyGov {
require(amount > 0, "!amount");
require(amount > maxMarketOrderTTL, "amount < maxMarketOrderTTL");
maxTriggerOrderTTL = amount;
}
/// @notice Set duration after orders can be executed with chainlink
/// @dev Only callable by governance
/// @param amount Duration in seconds
function setChainlinkCooldown(uint256 amount) external onlyGov {
require(amount > 0, "!amount");
chainlinkCooldown = amount;
}
/// @notice Adds order to storage
/// @dev Only callable by other protocol contracts
function add(Order memory order) external onlyContract returns (uint256) {
uint256 nextOrderId = ++oid;
order.orderId = nextOrderId;
orders[nextOrderId] = order;
userOrderIds[order.user].add(nextOrderId);
if (order.orderType == 0) {
marketOrderIds.add(order.orderId);
} else {
triggerOrderIds.add(order.orderId);
}
return nextOrderId;
}
/// @notice Removes order from store
/// @dev Only callable by other protocol contracts
/// @param orderId Order to remove
function remove(uint256 orderId) external onlyContract {
Order memory order = orders[orderId];
if (order.size == 0) return;
userOrderIds[order.user].remove(orderId);
marketOrderIds.remove(orderId);
triggerOrderIds.remove(orderId);
delete orders[orderId];
}
/// @notice Removes order from store
/// @dev Only callable by other protocol contracts
/// @param orderId Order to remove
function unsafeRemove(uint256 orderId) external onlyGov {
Order memory order = orders[orderId];
userOrderIds[order.user].remove(orderId);
marketOrderIds.remove(orderId);
triggerOrderIds.remove(orderId);
delete orders[orderId];
}
/// @notice Removes many orders from store
/// @dev Only callable by governance
/// @param orderIds Orders to remove
function unsafeRemoveMany(uint256[] calldata orderIds) external onlyGov {
for (uint256 i = 0; i < orderIds.length; i++) {
uint256 orderId = orderIds[i];
Order memory order = orders[orderId];
userOrderIds[order.user].remove(orderId);
marketOrderIds.remove(orderId);
triggerOrderIds.remove(orderId);
delete orders[orderId];
}
}
/// @notice Updates `cancelOrderId` of `orderId`, e.g. TP order cancels a SL order and vice versa
/// @dev Only callable by other protocol contracts
/// @param orderId Order which cancels `cancelOrderId` on execution
/// @param cancelOrderId Order to cancel when `orderId` executes
function updateCancelOrderId(
uint256 orderId,
uint256 cancelOrderId
) external onlyContract {
Order storage order = orders[orderId];
order.cancelOrderId = cancelOrderId;
}
/// @notice Returns a single order
/// @param orderId Order to get
function get(uint256 orderId) external view returns (Order memory) {
return orders[orderId];
}
/// @notice Returns many orders
/// @param orderIds Orders to get, e.g. [1, 2, 5]
function getMany(
uint256[] calldata orderIds
) external view returns (Order[] memory) {
uint256 length = orderIds.length;
Order[] memory _orders = new Order[](length);
for (uint256 i = 0; i < length; i++) {
_orders[i] = orders[orderIds[i]];
}
return _orders;
}
/// @notice Returns market orders
/// @param length Amount of market orders to return
function getMarketOrders(
uint256 length
) external view returns (Order[] memory) {
uint256 _length = marketOrderIds.length();
if (length > _length) length = _length;
Order[] memory _orders = new Order[](length);
for (uint256 i = 0; i < length; i++) {
_orders[i] = orders[marketOrderIds.at(i)];
}
return _orders;
}
/// @notice Returns trigger orders
/// @param length Amount of trigger orders to return
/// @param offset Offset to start
function getTriggerOrders(
uint256 length,
uint256 offset
) external view returns (Order[] memory) {
uint256 _length = triggerOrderIds.length();
require(offset <= _length, "Offset out of bounds");
uint256 availableLength = _length - offset;
uint256 resultLength = length > availableLength
? availableLength
: length;
Order[] memory _orders = new Order[](resultLength);
for (uint256 i = 0; i < resultLength; i++) {
_orders[i] = orders[triggerOrderIds.at(i + offset)];
}
return _orders;
}
/// @notice Returns orders of `user`
function getUserOrders(
address user
) external view returns (Order[] memory) {
uint256 length = userOrderIds[user].length();
Order[] memory _orders = new Order[](length);
for (uint256 i = 0; i < length; i++) {
_orders[i] = orders[userOrderIds[user].at(i)];
}
return _orders;
}
/// @notice Returns amount of market orders
function getMarketOrderCount() external view returns (uint256) {
return marketOrderIds.length();
}
/// @notice Returns amount of trigger orders
function getTriggerOrderCount() external view returns (uint256) {
return triggerOrderIds.length();
}
/// @notice Returns order amount of `user`
function getUserOrderCount(address user) external view returns (uint256) {
return userOrderIds[user].length();
}
/// @notice Returns true if order is from `user`
/// @param orderId order to check
/// @param user user to check
function isUserOrder(
uint256 orderId,
address user
) external view returns (bool) {
return userOrderIds[user].contains(orderId);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/structs/EnumerableSet.sol)
// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.
pragma solidity 0.8.17;
/**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are made on the ordering.
*
* ```
* contract Example {
* // Add the library methods
* using EnumerableSet for EnumerableSet.AddressSet;
*
* // Declare a set state variable
* EnumerableSet.AddressSet private mySet;
* }
* ```
*
* As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)
* and `uint256` (`UintSet`) are supported.
*
* [WARNING]
* ====
* Trying to delete such a structure from storage will likely result in data corruption, rendering the structure unusable.
* See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.
*
* In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an array of EnumerableSet.
* ====
*/
library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are just wrappers around the
// underlying Set.
// This means that we can only create new EnumerableSets for types that fit
// in bytes32.
struct Set {
// Storage of set values
bytes32[] _values;
// Position of the value in the `values` array, plus 1 because index 0
// means a value is not in the set.
mapping(bytes32 => uint256) _indexes;
}
/**
* @dev Add a value to a set. O(1).
*
* Returns true if the value was added to the set, that is if it was not
* already present.
*/
function _add(Set storage set, bytes32 value) private returns (bool) {
if (!_contains(set, value)) {
set._values.push(value);
// The value is stored at length-1, but we add 1 to all indexes
// and use 0 as a sentinel value
set._indexes[value] = set._values.length;
return true;
} else {
return false;
}
}
/**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/
function _remove(Set storage set, bytes32 value) private returns (bool) {
// We read and store the value's index to prevent multiple reads from the same storage slot
uint256 valueIndex = set._indexes[value];
if (valueIndex != 0) {
// Equivalent to contains(set, value)
// To delete an element from the _values array in O(1), we swap the element to delete with the last one in
// the array, and then remove the last element (sometimes called as 'swap and pop').
// This modifies the order of the array, as noted in {at}.
uint256 toDeleteIndex = valueIndex - 1;
uint256 lastIndex = set._values.length - 1;
if (lastIndex != toDeleteIndex) {
bytes32 lastValue = set._values[lastIndex];
// Move the last value to the index where the value to delete is
set._values[toDeleteIndex] = lastValue;
// Update the index for the moved value
set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex
}
// Delete the slot where the moved value was stored
set._values.pop();
// Delete the index for the deleted slot
delete set._indexes[value];
return true;
} else {
return false;
}
}
/**
* @dev Returns true if the value is in the set. O(1).
*/
function _contains(
Set storage set,
bytes32 value
) private view returns (bool) {
return set._indexes[value] != 0;
}
/**
* @dev Returns the number of values on the set. O(1).
*/
function _length(Set storage set) private view returns (uint256) {
return set._values.length;
}
/**
* @dev Returns the value stored at position `index` in the set. O(1).
*
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/
function _at(
Set storage set,
uint256 index
) private view returns (bytes32) {
return set._values[index];
}
/**
* @dev Return the entire set in an array
*
* WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
* to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
* this function has an unbounded cost, and using it as part of a state-changing function may render the function
* uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
*/
function _values(Set storage set) private view returns (bytes32[] memory) {
return set._values;
}
// Bytes32Set
struct Bytes32Set {
Set _inner;
}
/**
* @dev Add a value to a set. O(1).
*
* Returns true if the value was added to the set, that is if it was not
* already present.
*/
function add(
Bytes32Set storage set,
bytes32 value
) internal returns (bool) {
return _add(set._inner, value);
}
/**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/
function remove(
Bytes32Set storage set,
bytes32 value
) internal returns (bool) {
return _remove(set._inner, value);
}
/**
* @dev Returns true if the value is in the set. O(1).
*/
function contains(
Bytes32Set storage set,
bytes32 value
) internal view returns (bool) {
return _contains(set._inner, value);
}
/**
* @dev Returns the number of values in the set. O(1).
*/
function length(Bytes32Set storage set) internal view returns (uint256) {
return _length(set._inner);
}
/**
* @dev Returns the value stored at position `index` in the set. O(1).
*
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/
function at(
Bytes32Set storage set,
uint256 index
) internal view returns (bytes32) {
return _at(set._inner, index);
}
/**
* @dev Return the entire set in an array
*
* WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
* to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
* this function has an unbounded cost, and using it as part of a state-changing function may render the function
* uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
*/
function values(
Bytes32Set storage set
) internal view returns (bytes32[] memory) {
bytes32[] memory store = _values(set._inner);
bytes32[] memory result;
/// @solidity memory-safe-assembly
assembly {
result := store
}
return result;
}
// AddressSet
struct AddressSet {
Set _inner;
}
/**
* @dev Add a value to a set. O(1).
*
* Returns true if the value was added to the set, that is if it was not
* already present.
*/
function add(
AddressSet storage set,
address value
) internal returns (bool) {
return _add(set._inner, bytes32(uint256(uint160(value))));
}
/**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/
function remove(
AddressSet storage set,
address value
) internal returns (bool) {
return _remove(set._inner, bytes32(uint256(uint160(value))));
}
/**
* @dev Returns true if the value is in the set. O(1).
*/
function contains(
AddressSet storage set,
address value
) internal view returns (bool) {
return _contains(set._inner, bytes32(uint256(uint160(value))));
}
/**
* @dev Returns the number of values in the set. O(1).
*/
function length(AddressSet storage set) internal view returns (uint256) {
return _length(set._inner);
}
/**
* @dev Returns the value stored at position `index` in the set. O(1).
*
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/
function at(
AddressSet storage set,
uint256 index
) internal view returns (address) {
return address(uint160(uint256(_at(set._inner, index))));
}
/**
* @dev Return the entire set in an array
*
* WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
* to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
* this function has an unbounded cost, and using it as part of a state-changing function may render the function
* uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
*/
function values(
AddressSet storage set
) internal view returns (address[] memory) {
bytes32[] memory store = _values(set._inner);
address[] memory result;
/// @solidity memory-safe-assembly
assembly {
result := store
}
return result;
}
// UintSet
struct UintSet {
Set _inner;
}
/**
* @dev Add a value to a set. O(1).
*
* Returns true if the value was added to the set, that is if it was not
* already present.
*/
function add(UintSet storage set, uint256 value) internal returns (bool) {
return _add(set._inner, bytes32(value));
}
/**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/
function remove(
UintSet storage set,
uint256 value
) internal returns (bool) {
return _remove(set._inner, bytes32(value));
}
/**
* @dev Returns true if the value is in the set. O(1).
*/
function contains(
UintSet storage set,
uint256 value
) internal view returns (bool) {
return _contains(set._inner, bytes32(value));
}
/**
* @dev Returns the number of values in the set. O(1).
*/
function length(UintSet storage set) internal view returns (uint256) {
return _length(set._inner);
}
/**
* @dev Returns the value stored at position `index` in the set. O(1).
*
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/
function at(
UintSet storage set,
uint256 index
) internal view returns (uint256) {
return uint256(_at(set._inner, index));
}
/**
* @dev Return the entire set in an array
*
* WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
* to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
* this function has an unbounded cost, and using it as part of a state-changing function may render the function
* uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
*/
function values(
UintSet storage set
) internal view returns (uint256[] memory) {
bytes32[] memory store = _values(set._inner);
uint256[] memory result;
/// @solidity memory-safe-assembly
assembly {
result := store
}
return result;
}
}// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.17;
import "./Governable.sol";
import "./RoleStore.sol";
/// @title Roles
/// @notice Role-based access control mechanism via onlyContract modifier
abstract contract Roles is Governable {
bytes32 internal constant CONTRACT_ROLE = keccak256("CONTRACT");
RoleStore public roleStore;
/// @dev Reverts if caller address has not the contract role
modifier onlyContract() {
require(roleStore.hasRole(msg.sender, CONTRACT_ROLE), "!contract-role");
_;
}
}// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.17;
import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";
/// @title Governable
/// @notice Basic access control mechanism, gov has access to certain functions
abstract contract Governable is Initializable {
address public gov;
event SetGov(address prevGov, address nextGov);
/// @dev Reverts if called by any account other than gov
modifier onlyGov() {
require(msg.sender == gov, "!gov");
_;
}
/// @notice Sets a new governance address
/// @dev Only callable by governance
function setGov(address _gov) external onlyGov {
_setGov(_gov);
}
/// @notice Sets a new governance address
/// @dev Internal function without access restriction
function _setGov(address _gov) internal {
require(_gov != address(0), "!zero-gov");
address prevGov = gov;
gov = _gov;
emit SetGov(prevGov, _gov);
}
}// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.17;
import "./EnumerableSet.sol";
import "./Governable.sol";
/**
* @title RoleStore
* @notice Role-based access control mechanism. Governance can grant and
* revoke roles dynamically via {grantRole} and {revokeRole}
*/
contract RoleStore is Governable {
// Libraries
using EnumerableSet for EnumerableSet.AddressSet;
using EnumerableSet for EnumerableSet.Bytes32Set;
event RoleGranted(
bytes32 indexed role,
address indexed account,
address indexed sender
);
event RoleRevoked(
bytes32 indexed role,
address indexed account,
address indexed sender
);
// Set of roles
EnumerableSet.Bytes32Set internal roles;
// Role -> address
mapping(bytes32 => EnumerableSet.AddressSet) internal roleMembers;
function initialize() external initializer {
_setGov(msg.sender);
}
/// @notice Grants `role` to `account`
/// @dev Only callable by governance
function grantRole(address account, bytes32 role) external onlyGov {
// add role if not already present
if (!roles.contains(role)) roles.add(role);
require(roleMembers[role].add(account));
emit RoleGranted(role, account, msg.sender);
}
/// @notice Revokes `role` from `account`
/// @dev Only callable by governance
function revokeRole(address account, bytes32 role) external onlyGov {
require(roleMembers[role].remove(account));
emit RoleRevoked(role, account, msg.sender);
// Remove role if it has no longer any members
if (roleMembers[role].length() == 0) {
roles.remove(role);
}
}
/// @notice Returns `true` if `account` has been granted `role`
function hasRole(
address account,
bytes32 role
) external view returns (bool) {
return roleMembers[role].contains(account);
}
/// @notice Returns number of roles
function getRoleCount() external view returns (uint256) {
return roles.length();
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (proxy/utils/Initializable.sol)
pragma solidity ^0.8.2;
import "../../utils/Address.sol";
/**
* @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed
* behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an
* external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer
* function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.
*
* The initialization functions use a version number. Once a version number is used, it is consumed and cannot be
* reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in
* case an upgrade adds a module that needs to be initialized.
*
* For example:
*
* [.hljs-theme-light.nopadding]
* ```
* contract MyToken is ERC20Upgradeable {
* function initialize() initializer public {
* __ERC20_init("MyToken", "MTK");
* }
* }
* contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {
* function initializeV2() reinitializer(2) public {
* __ERC20Permit_init("MyToken");
* }
* }
* ```
*
* TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as
* possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.
*
* CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure
* that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.
*
* [CAUTION]
* ====
* Avoid leaving a contract uninitialized.
*
* An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation
* contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke
* the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:
*
* [.hljs-theme-light.nopadding]
* ```
* /// @custom:oz-upgrades-unsafe-allow constructor
* constructor() {
* _disableInitializers();
* }
* ```
* ====
*/
abstract contract Initializable {
/**
* @dev Indicates that the contract has been initialized.
* @custom:oz-retyped-from bool
*/
uint8 private _initialized;
/**
* @dev Indicates that the contract is in the process of being initialized.
*/
bool private _initializing;
/**
* @dev Triggered when the contract has been initialized or reinitialized.
*/
event Initialized(uint8 version);
/**
* @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,
* `onlyInitializing` functions can be used to initialize parent contracts.
*
* Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a
* constructor.
*
* Emits an {Initialized} event.
*/
modifier initializer() {
bool isTopLevelCall = !_initializing;
require(
(isTopLevelCall && _initialized < 1) || (!Address.isContract(address(this)) && _initialized == 1),
"Initializable: contract is already initialized"
);
_initialized = 1;
if (isTopLevelCall) {
_initializing = true;
}
_;
if (isTopLevelCall) {
_initializing = false;
emit Initialized(1);
}
}
/**
* @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the
* contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be
* used to initialize parent contracts.
*
* A reinitializer may be used after the original initialization step. This is essential to configure modules that
* are added through upgrades and that require initialization.
*
* When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`
* cannot be nested. If one is invoked in the context of another, execution will revert.
*
* Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in
* a contract, executing them in the right order is up to the developer or operator.
*
* WARNING: setting the version to 255 will prevent any future reinitialization.
*
* Emits an {Initialized} event.
*/
modifier reinitializer(uint8 version) {
require(!_initializing && _initialized < version, "Initializable: contract is already initialized");
_initialized = version;
_initializing = true;
_;
_initializing = false;
emit Initialized(version);
}
/**
* @dev Modifier to protect an initialization function so that it can only be invoked by functions with the
* {initializer} and {reinitializer} modifiers, directly or indirectly.
*/
modifier onlyInitializing() {
require(_initializing, "Initializable: contract is not initializing");
_;
}
/**
* @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.
* Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized
* to any version. It is recommended to use this to lock implementation contracts that are designed to be called
* through proxies.
*
* Emits an {Initialized} event the first time it is successfully executed.
*/
function _disableInitializers() internal virtual {
require(!_initializing, "Initializable: contract is initializing");
if (_initialized < type(uint8).max) {
_initialized = type(uint8).max;
emit Initialized(type(uint8).max);
}
}
/**
* @dev Internal function that returns the initialized version. Returns `_initialized`
*/
function _getInitializedVersion() internal view returns (uint8) {
return _initialized;
}
/**
* @dev Internal function that returns the initialized version. Returns `_initializing`
*/
function _isInitializing() internal view returns (bool) {
return _initializing;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.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
* ====
*
* [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://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
*
* IMPORTANT: because control is transferred to `recipient`, care must be
* taken to not create reentrancy vulnerabilities. Consider using
* {ReentrancyGuard} or the
* https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
(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);
}
}
}{
"remappings": [
"@openzeppelin/=lib/openzeppelin-contracts/",
"chainlink/=node_modules/@chainlink/",
"pyth-sdk-solidity/=node_modules/@pythnetwork/pyth-sdk-solidity/",
"@uniswap/v2-periphery/=node_modules/@uniswap/v2-periphery/",
"@uniswap/v2-core/=node_modules/@uniswap/v2-core/",
"ds-test/=lib/openzeppelin-contracts-upgradeable/lib/forge-std/lib/ds-test/src/",
"erc4626-tests/=lib/openzeppelin-contracts-upgradeable/lib/erc4626-tests/",
"forge-std/=lib/forge-std/src/",
"openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/",
"openzeppelin-contracts/=lib/openzeppelin-contracts/",
"openzeppelin/=lib/openzeppelin-contracts-upgradeable/contracts/"
],
"optimizer": {
"enabled": true,
"runs": 200
},
"metadata": {
"useLiteralContent": false,
"bytecodeHash": "ipfs"
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"evmVersion": "london",
"viaIR": true
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"prevGov","type":"address"},{"indexed":false,"internalType":"address","name":"nextGov","type":"address"}],"name":"SetGov","type":"event"},{"inputs":[{"components":[{"internalType":"uint256","name":"orderId","type":"uint256"},{"internalType":"address","name":"user","type":"address"},{"internalType":"address","name":"asset","type":"address"},{"internalType":"string","name":"market","type":"string"},{"internalType":"uint256","name":"margin","type":"uint256"},{"internalType":"uint256","name":"size","type":"uint256"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"fee","type":"uint256"},{"internalType":"bool","name":"isLong","type":"bool"},{"internalType":"uint8","name":"orderType","type":"uint8"},{"internalType":"bool","name":"isReduceOnly","type":"bool"},{"internalType":"uint256","name":"timestamp","type":"uint256"},{"internalType":"uint256","name":"expiry","type":"uint256"},{"internalType":"uint256","name":"cancelOrderId","type":"uint256"}],"internalType":"struct OrderStore.Order","name":"order","type":"tuple"}],"name":"add","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"areNewOrdersPaused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"chainlinkCooldown","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"orderId","type":"uint256"}],"name":"get","outputs":[{"components":[{"internalType":"uint256","name":"orderId","type":"uint256"},{"internalType":"address","name":"user","type":"address"},{"internalType":"address","name":"asset","type":"address"},{"internalType":"string","name":"market","type":"string"},{"internalType":"uint256","name":"margin","type":"uint256"},{"internalType":"uint256","name":"size","type":"uint256"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"fee","type":"uint256"},{"internalType":"bool","name":"isLong","type":"bool"},{"internalType":"uint8","name":"orderType","type":"uint8"},{"internalType":"bool","name":"isReduceOnly","type":"bool"},{"internalType":"uint256","name":"timestamp","type":"uint256"},{"internalType":"uint256","name":"expiry","type":"uint256"},{"internalType":"uint256","name":"cancelOrderId","type":"uint256"}],"internalType":"struct OrderStore.Order","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"orderIds","type":"uint256[]"}],"name":"getMany","outputs":[{"components":[{"internalType":"uint256","name":"orderId","type":"uint256"},{"internalType":"address","name":"user","type":"address"},{"internalType":"address","name":"asset","type":"address"},{"internalType":"string","name":"market","type":"string"},{"internalType":"uint256","name":"margin","type":"uint256"},{"internalType":"uint256","name":"size","type":"uint256"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"fee","type":"uint256"},{"internalType":"bool","name":"isLong","type":"bool"},{"internalType":"uint8","name":"orderType","type":"uint8"},{"internalType":"bool","name":"isReduceOnly","type":"bool"},{"internalType":"uint256","name":"timestamp","type":"uint256"},{"internalType":"uint256","name":"expiry","type":"uint256"},{"internalType":"uint256","name":"cancelOrderId","type":"uint256"}],"internalType":"struct OrderStore.Order[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getMarketOrderCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"length","type":"uint256"}],"name":"getMarketOrders","outputs":[{"components":[{"internalType":"uint256","name":"orderId","type":"uint256"},{"internalType":"address","name":"user","type":"address"},{"internalType":"address","name":"asset","type":"address"},{"internalType":"string","name":"market","type":"string"},{"internalType":"uint256","name":"margin","type":"uint256"},{"internalType":"uint256","name":"size","type":"uint256"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"fee","type":"uint256"},{"internalType":"bool","name":"isLong","type":"bool"},{"internalType":"uint8","name":"orderType","type":"uint8"},{"internalType":"bool","name":"isReduceOnly","type":"bool"},{"internalType":"uint256","name":"timestamp","type":"uint256"},{"internalType":"uint256","name":"expiry","type":"uint256"},{"internalType":"uint256","name":"cancelOrderId","type":"uint256"}],"internalType":"struct OrderStore.Order[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTriggerOrderCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"length","type":"uint256"},{"internalType":"uint256","name":"offset","type":"uint256"}],"name":"getTriggerOrders","outputs":[{"components":[{"internalType":"uint256","name":"orderId","type":"uint256"},{"internalType":"address","name":"user","type":"address"},{"internalType":"address","name":"asset","type":"address"},{"internalType":"string","name":"market","type":"string"},{"internalType":"uint256","name":"margin","type":"uint256"},{"internalType":"uint256","name":"size","type":"uint256"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"fee","type":"uint256"},{"internalType":"bool","name":"isLong","type":"bool"},{"internalType":"uint8","name":"orderType","type":"uint8"},{"internalType":"bool","name":"isReduceOnly","type":"bool"},{"internalType":"uint256","name":"timestamp","type":"uint256"},{"internalType":"uint256","name":"expiry","type":"uint256"},{"internalType":"uint256","name":"cancelOrderId","type":"uint256"}],"internalType":"struct OrderStore.Order[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"getUserOrderCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"getUserOrders","outputs":[{"components":[{"internalType":"uint256","name":"orderId","type":"uint256"},{"internalType":"address","name":"user","type":"address"},{"internalType":"address","name":"asset","type":"address"},{"internalType":"string","name":"market","type":"string"},{"internalType":"uint256","name":"margin","type":"uint256"},{"internalType":"uint256","name":"size","type":"uint256"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"fee","type":"uint256"},{"internalType":"bool","name":"isLong","type":"bool"},{"internalType":"uint8","name":"orderType","type":"uint8"},{"internalType":"bool","name":"isReduceOnly","type":"bool"},{"internalType":"uint256","name":"timestamp","type":"uint256"},{"internalType":"uint256","name":"expiry","type":"uint256"},{"internalType":"uint256","name":"cancelOrderId","type":"uint256"}],"internalType":"struct OrderStore.Order[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"gov","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"rs","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"isProcessingPaused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"orderId","type":"uint256"},{"internalType":"address","name":"user","type":"address"}],"name":"isUserOrder","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxMarketOrderTTL","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxTriggerOrderTTL","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"oid","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"orderId","type":"uint256"}],"name":"remove","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"roleStore","outputs":[{"internalType":"contract RoleStore","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bool","name":"b","type":"bool"}],"name":"setAreNewOrdersPaused","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"setChainlinkCooldown","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_gov","type":"address"}],"name":"setGov","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"b","type":"bool"}],"name":"setIsProcessingPaused","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"setMaxMarketOrderTTL","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"setMaxTriggerOrderTTL","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"orderId","type":"uint256"}],"name":"unsafeRemove","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"orderIds","type":"uint256[]"}],"name":"unsafeRemoveMany","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"orderId","type":"uint256"},{"internalType":"uint256","name":"cancelOrderId","type":"uint256"}],"name":"updateCancelOrderId","outputs":[],"stateMutability":"nonpayable","type":"function"}]Contract Creation Code
60808060405234610016576124fe908161001c8239f35b600080fdfe6080604052600436101561001257600080fd5b60003560e01c8063101ce0e71461186357806312d43a511461183657806315b01141146118185780631d66bd88146117fa5780632cc75967146117c0578063346e89f1146117a25780633ad1cafb146115ae5780634a4a7b04146115855780634cc82215146114e257806359f0fc20146114a657806363c69f081461134057806367637b9114610ebb57806368a3a17714610c5657806380de66b714610c385780638ae7fea214610bad5780638efd471614610a2d5780639507d39a146108a95780639cfb82dc146106f2578063bde4acda146106a5578063bf708556146104e1578063c13e6cb8146104c3578063c2582669146104a5578063c4d66de81461034f578063cfad57a214610314578063d2e711c814610249578063d9a9d872146101ef578063e80225d0146101c9578063ed33a582146101a65763ef0bcc141461015b57600080fd5b346101a15760203660031901126101a157610174611aec565b61018c60018060a01b0360005460101c163314611b1e565b60ff8019600c54169115151617600c55600080f35b600080fd5b346101a15760003660031901126101a157602060ff600c54166040519015158152f35b346101a15760003660031901126101a157602060ff600c5460081c166040519015158152f35b346101a15760403660031901126101a1576024356001600160a01b038116908190036101a1576000526004602052602061023f600435604060002060019160005201602052604060002054151590565b6040519015158152f35b346101a15761025736611b08565b60015460405163ac4ab3fb60e01b81523360048201527fa66b7a3e6b19d24ccb6f717fc232a1bb0278a7f83f8e2211835fc4ed0fe69f19602482015291929190602090829060449082906001600160a01b03165afa8015610308576102c4916000916102da575b50611c41565b6000526003602052600b60406000200155600080f35b6102fb915060203d8111610301575b6102f38183611aca565b810190611c29565b846102be565b503d6102e9565b6040513d6000823e3d90fd5b346101a15760203660031901126101a15761034d6103306118ee565b61034860018060a01b0360005460101c163314611b1e565b611b50565b005b346101a15760203660031901126101a1576103686118ee565b6000549060ff8260081c161591828093610498575b8015610481575b156104255760ff19811660011760005582610413575b5060018060a01b03166bffffffffffffffffffffffff60a01b60015416176001556103c433611b50565b61012c8060095562ed4e00600a55600b556103db57005b61ff0019600054166000557f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498602060405160018152a1005b61ffff1916610101176000558261039a565b60405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608490fd5b50303b1580156103845750600160ff821614610384565b50600160ff82161061037d565b346101a15760003660031901126101a1576020600254604051908152f35b346101a15760003660031901126101a1576020600b54604051908152f35b346101a1576104ef36611918565b906104f982612464565b9160005b81811061051657604051806105128682611a4b565b0390f35b6105218183856123d4565b3560005260036020908082526040600020906040519261054084611aad565b825484526001808401546001600160a01b0390811683870152600285015416604080870191909152519284018054600093929161057c82611c8d565b808752918381169081156106805750600114610642575b5050505091816105ac600b9361063d9796950382611aca565b606084015260048101546080840152600581015460a0840152600681015460c0840152600781015460e084015260088082015460ff80821615156101008701529181901c821661012086015260101c1615156101408401526009810154610160840152600a81015461018084015201546101a082015261062c82876124b4565b5261063781866124b4565b50611c7e565b6104fd565b909192935060005282600020916000925b82841061066d57505050820101816105ac8161063d610593565b8054868501860152928401928101610653565b60ff1916858801525050151560051b840190910191508290506105ac8161063d610593565b346101a15760203660031901126101a1576106be611aec565b6106d660018060a01b0360005460101c163314611b1e565b61ff00600c5491151560081b169061ff00191617600c55600080f35b346101a1576020806003193601126101a1576004359060018060a01b03916107228360005460101c163314611b1e565b806000526003825260406000209260405161073c81611aad565b845481526001908282870154169185820192835283600288015416604083015260038701906040519160009181549161077483611c8d565b808652928281169081156108895750600114610852575b505050600397826107a36101a094600b940382611aca565b606085015260048101546080850152600581015460a0850152600681015460c0850152600781015460e085015260ff60088201548181161515610100870152818160081c1661012087015260101c1615156101408501526009810154610160850152600a810154610180850152015491015251166000526004825261082c8160406000206122e4565b5061083681612151565b506108408161223b565b506000525261034d6040600020611e87565b60009081528981209093505b828410610876575050508101860187826107a361078b565b80548585018b015292890192810161085e565b60ff19168b870152505050151560051b82018701905087826107a361078b565b346101a1576020806003193601126101a1576108c36123e4565b5060043560005260038152604060002090604051906108e182611aad565b825482526001808401546001600160a01b03908116838501526002850154166040808501919091525160038501805460009693909161091f83611c8d565b80855292828116908115610a0c57506001146109d2575b50505061094981600b9495960382611aca565b606085015260048101546080850152600581015460a0850152600681015460c0850152600781015460e085015260ff60088201548181161515610100870152818160081c1661012087015260101c1615156101408501526009810154610160850152600a81015461018085015201546101a0830152610512604051928284938452830190611965565b60009081528581209097505b8288106109f95750505093840182019361094981600b610936565b80548489018701529685019681016109de565b60ff191685880152505050151560051b81018301945061094981600b610936565b346101a15760203660031901126101a157600554600435818111610ba6575b610a5581612464565b9160005b828110610a6e57604051806105128682611a4b565b81811015610b9057807f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db00154600052600380602052604060002060405191610ab583611aad565b815483526001808301546001600160a01b03908116602086015260028401541660408086019190915251918301805460009291610af182611c8d565b80865291838116908115610b655750600114610b25575b50505091816105ac600b93610b209796950382611aca565b610a59565b909192506000526020600020916000925b828410610b50575050508101602001816105ac600b610b08565b81816020925483878901015201930192610b36565b60ff191660208088019190915292151560051b860190920193508492506105ac9150600b9050610b08565b634e487b7160e01b600052603260045260246000fd5b5080610a4c565b346101a15760203660031901126101a157600435610bd960018060a01b0360005460101c163314611b1e565b610be4811515611bf3565b600954811115610bf357600a55005b60405162461bcd60e51b815260206004820152601a60248201527f616d6f756e74203c206d61784d61726b65744f7264657254544c0000000000006044820152606490fd5b346101a15760003660031901126101a1576020600754604051908152f35b346101a157610c6436611b08565b9060075490818311610e7f5782820390828211610e5f5781811115610e7557509190915b610c9181612464565b926000925b828410610cab57604051806105128782611a4b565b808401808511610e5f5782811015610b90577fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68801546000526003936020858152604060002060405191610cfd83611aad565b8154835260018060a01b0397600198808a85015416838601526002840154166040850152820160405191600099825492610d3684611c8d565b80865293828116908115610e3c5750600114610dfa575b505050509081610d67600b93610df29798999a0382611aca565b606084015260048101546080840152600581015460a0840152600681015460c0840152600781015460e084015260088082015460ff80821615156101008701529181901c821661012086015260101c1615156101408401526009810154610160840152600a81015461018084015201546101a0820152610de782886124b4565b5261063781876124b4565b929190610c96565b9091929a50600052816000209960009a5b818c10610e29575050509781019097019680610d6781610df2610d4d565b8054858d018501529a83019a8201610e0b565b60ff19168487015250505090151560051b820101975080610d6781610df2610d4d565b634e487b7160e01b600052601160045260246000fd5b9050919091610c88565b60405162461bcd60e51b81526020600482015260146024820152734f6666736574206f7574206f6620626f756e647360601b6044820152606490fd5b346101a1576003196020368201126101a15767ffffffffffffffff600435116101a1576101c08091600435360301126101a15760405190810181811067ffffffffffffffff82111761130b57604052600435600401358152610f21602460043501611904565b6020820152610f34604460043501611904565b60408201526064600435013567ffffffffffffffff81116101a15760043501366023820112156101a157600481013567ffffffffffffffff811161130b5760405191610f8a601f8301601f191660200184611aca565b81835236602483830101116101a15781600092602460209301838601378301015260608201526004356084810135608083015260a481013560a083015260c481013560c083015260e481013560e0830152610fe89061010401611afb565b610100820152600435610124013560ff811690036101a157610124600435013561012082015261101d61014460043501611afb565b610140820152600480356101648101356101608401526101848101356101808401526101a401356101a083015260015460405163ac4ab3fb60e01b815233928101929092527fa66b7a3e6b19d24ccb6f717fc232a1bb0278a7f83f8e2211835fc4ed0fe69f196024830152602090829060449082906001600160a01b03165afa8015610308576110b4916000916113215750611c41565b6110bf600254611c7e565b80600255808252806000526003602052604060002091805183556001830160018060a01b03602083015116906bffffffffffffffffffffffff60a01b9182825416179055600284019060018060a01b0360408401511690825416179055606081015192835167ffffffffffffffff811161130b57806020956111446003850154611c8d565b601f81116112cd575b508690601f831160011461125e57600092611253575b50508160011b916000199060031b1c19161760038201555b6080820151600482015560a0820151600582015560c0820151600682015560e08201516007820155600881016101008301511515815461ff0061012086015160081b169060ff62ff0000610140880151151560101b1693169062ffffff191617171790556101608201516009820155610180820151600a820155600b6101a083015191015560018060a01b03838201511660005260048352611221826040600020611e30565b5061012081015160ff16611243576112399051611de3565b505b604051908152f35b61124d9051611d64565b5061123b565b015190508680611163565b92506003840160005286600020906000935b601f19841685106112b4576001945083601f1981161061129b575b505050811b01600382015561117b565b015160001960f88460031b161c1916905586808061128b565b8181015183559388019360019092019190880190611270565b6112fb906003860160005288600020601f850160051c8101918a8610611301575b601f0160051c0190611cc7565b8761114d565b90915081906112ee565b634e487b7160e01b600052604160045260246000fd5b61133a915060203d602011610301576102f38183611aca565b836102be565b346101a15760203660031901126101a1576001600160a01b036113616118ee565b1680600052600460205260406000205461137a81612464565b9160005b82811061139357604051806105128682611a4b565b8160005260046020526113aa816040600020611d4c565b9054600391821b1c600052806020526040600020604051916113cb83611aad565b815483526001808301546001600160a01b0390811660208601526002840154166040808601919091525191830180546000929161140782611c8d565b8086529183811690811561147b575060011461143b575b50505091816105ac600b936114369796950382611aca565b61137e565b909192506000526020600020916000925b828410611466575050508101602001816105ac600b61141e565b8181602092548387890101520193019261144c565b60ff191660208088019190915292151560051b860190920193508492506105ac9150600b905061141e565b346101a15760203660031901126101a1576004356114d260018060a01b0360005460101c163314611b1e565b6114dd811515611bf3565b600b55005b346101a15760203660031901126101a15760015460405163ac4ab3fb60e01b81523360048201527fa66b7a3e6b19d24ccb6f717fc232a1bb0278a7f83f8e2211835fc4ed0fe69f19602482015290602090829060449082906001600160a01b03165afa80156103085761155c916000916115675750611c41565b61034d600435611f1e565b61157f915060203d8111610301576102f38183611aca565b826102be565b346101a15760003660031901126101a1576001546040516001600160a01b039091168152602090f35b346101a1576115bc36611918565b906115d660005460018060a01b039060101c163314611b1e565b6000915b8083106115e357005b6115ee8382846123d4565b359283600052600360205260406000209360405161160b81611aad565b8554815260018601546001600160a01b03908116602083015260028701541660408083019190915251600387015460009061164581611c8d565b80845290600181169081156117805750600114611743575b509681611673600b9361173c98999a0382611aca565b606084015260048101546080840152600581015460a0840152600681015460c0840152600781015460e0840152600880820154809160ff92839182821615156101008901521c1661012086015260101c1615156101408401526009810154610160840152600a81015461018084015201546101a0820152602060018060a01b0391015116600052600460205261170d8160406000206122e4565b5061171781612151565b506117218161223b565b5060005260036020526117376040600020611e87565b611c7e565b91906115da565b9050600388016000526020600020906000915b81831061176a57505081016020018161165d565b6001816020925483868801015201920191611756565b60ff191660208086019190915291151560051b8401909101915082905061165d565b346101a15760003660031901126101a1576020600a54604051908152f35b346101a15760203660031901126101a1576001600160a01b036117e16118ee565b1660005260046020526020604060002054604051908152f35b346101a15760003660031901126101a1576020600554604051908152f35b346101a15760003660031901126101a1576020600954604051908152f35b346101a15760003660031901126101a15760005460405160109190911c6001600160a01b03168152602090f35b346101a15760203660031901126101a15760043561188f60018060a01b0360005460101c163314611b1e565b61189a811515611bf3565b600a548110156118a957600955005b60405162461bcd60e51b815260206004820152601b60248201527f616d6f756e74203e206d6178547269676765724f7264657254544c00000000006044820152606490fd5b600435906001600160a01b03821682036101a157565b35906001600160a01b03821682036101a157565b9060206003198301126101a15760043567ffffffffffffffff928382116101a157806023830112156101a15781600401359384116101a15760248460051b830101116101a1576024019190565b908151815260018060a01b036020908082850151168284015260408401511660408301526060830151906101c0918260608501528051809385015260005b838110611a36575050506101e09260008483850101526080810151608084015260a081015160a084015260c081015160c084015260e081015160e08401526101008082015115159084015261012060ff81830151169084015261014080820151151590840152610160808201519084015261018080820151908401526101a08091015190830152601f8019910116010190565b8181018301518582016101e0015282016119a3565b602080820190808352835180925260408301928160408460051b8301019501936000915b848310611a7f5750505050505090565b9091929394958480611a9d600193603f198682030187528a51611965565b9801930193019194939290611a6f565b6101c0810190811067ffffffffffffffff82111761130b57604052565b90601f8019910116810190811067ffffffffffffffff82111761130b57604052565b6004359081151582036101a157565b359081151582036101a157565b60409060031901126101a1576004359060243590565b15611b2557565b606460405162461bcd60e51b815260206004820152600460248201526310b3b7bb60e11b6044820152fd5b6001600160a01b03818116918215611bc2576000805462010000600160b01b03198116601093841b62010000600160b01b031617909155604080519190921c909216825260208201929092527f53351836099c03ffc3b1727d8abd4b0222afa87d4ed76ae3102d51369ef7f7859190a1565b60405162461bcd60e51b815260206004820152600960248201526810bd32b93796b3b7bb60b91b6044820152606490fd5b15611bfa57565b60405162461bcd60e51b815260206004820152600760248201526608585b5bdd5b9d60ca1b6044820152606490fd5b908160209103126101a1575180151581036101a15790565b15611c4857565b60405162461bcd60e51b815260206004820152600e60248201526d21636f6e74726163742d726f6c6560901b6044820152606490fd5b6000198114610e5f5760010190565b90600182811c92168015611cbd575b6020831014611ca757565b634e487b7160e01b600052602260045260246000fd5b91607f1691611c9c565b818110611cd2575050565b60008155600101611cc7565b600754811015610b905760076000527fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c6880190600090565b600554811015610b905760056000527f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db00190600090565b8054821015610b905760005260206000200190600090565b600081815260086020526040812054611dde57600754600160401b811015611dca579082611db6611d9d84600160409601600755611cde565b819391549060031b600019811b9283911b169119161790565b905560075492815260086020522055600190565b634e487b7160e01b82526041600452602482fd5b905090565b600081815260066020526040812054611dde57600554600160401b811015611dca579082611e1c611d9d84600160409601600555611d15565b905560055492815260066020522055600190565b6000828152600182016020526040902054611e8057805490600160401b82101561130b5782611e69611d9d846001809601855584611d4c565b905580549260005201602052604060002055600190565b5050600090565b600b6000918281558260018201558260028201558260038201611eaa8154611c8d565b80611edf575b5050600482015582600582015582600682015582600782015582600882015582600982015582600a8201550155565b601f8111600114611ef55750555b823880611eb0565b81835260208320611f1191601f0160051c810190600101611cc7565b8160208120915555611eed565b600090808252602060038152604080842091815191611f3c83611aad565b8354835260018060a01b039460019486868201541694848101958652876002830154168482015260038201845190818b825492611f7884611c8d565b938484528a8d821691826000146121315750506001146120f4575b50611fa092500382611aca565b6060820152600482015460808201526101a0600b6005840154938460a0850152600681015460c0850152600781015460e085015260ff60088201548181161515610100870152818160081c1661012087015260101c1615156101408501526009810154610160850152600a8101546101808501520154910152156120eb57600b9587945116845260048352612037818386206122e4565b5061204181612151565b5061204b8161223b565b50835260038252822092828455828185015582600285015560038401916120728354611c8d565b91826120aa575b50505050600482015582600582015582600682015582600782015582600882015582600982015582600a8201550155565b82601f8694116001146120c75750505050555b8238808080612079565b6120e191858552601f848620920160051c82019101611cc7565b81209155556120bd565b50505050505050565b9150508b5281878c8b8282205b858310612118575050611fa0935082010138611f93565b80919294505483858801015201910188908b8593612101565b60ff191685820152611fa095151560051b8501019250389150611f939050565b60008181526006602052604081205490919080156122365760001990808201818111612222576005549083820191821161220e578082036121da575b50505060055480156121c6578101906121a582611d15565b909182549160031b1b19169055600555815260066020526040812055600190565b634e487b7160e01b84526031600452602484fd5b6121f86121e9611d9d93611d15565b90549060031b1c928392611d15565b905584526006602052604084205538808061218d565b634e487b7160e01b86526011600452602486fd5b634e487b7160e01b85526011600452602485fd5b505090565b60008181526008602052604081205490919080156122365760001990808201818111612222576007549083820191821161220e578082036122b0575b50505060075480156121c65781019061228f82611cde565b909182549160031b1b19169055600755815260086020526040812055600190565b6122ce6122bf611d9d93611cde565b90549060031b1c928392611cde565b9055845260086020526040842055388080612277565b906001820190600092818452826020526040842054908115156000146123cd57600019918083018181116123b9578254908482019182116123a557808203612370575b5050508054801561235c5782019161233f8383611d4c565b909182549160031b1b191690555582526020526040812055600190565b634e487b7160e01b86526031600452602486fd5b612390612380611d9d9386611d4c565b90549060031b1c92839286611d4c565b90558652846020526040862055388080612327565b634e487b7160e01b88526011600452602488fd5b634e487b7160e01b87526011600452602487fd5b5050505090565b9190811015610b905760051b0190565b604051906123f182611aad565b816101a06000918281528260208201528260408201526060808201528260808201528260a08201528260c08201528260e082015282610100820152826101208201528261014082015282610160820152826101808201520152565b67ffffffffffffffff811161130b5760051b60200190565b9061246e8261244c565b61247b6040519182611aca565b828152809261248c601f199161244c565b019060005b82811061249d57505050565b6020906124a86123e4565b82828501015201612491565b8051821015610b905760209160051b01019056fea26469706673582212202019575cf561578fdff07d3ef574f336e2ac33a3768b1058022fc17c020ee7ac64736f6c63430008110033
Deployed Bytecode
0x6080604052600436101561001257600080fd5b60003560e01c8063101ce0e71461186357806312d43a511461183657806315b01141146118185780631d66bd88146117fa5780632cc75967146117c0578063346e89f1146117a25780633ad1cafb146115ae5780634a4a7b04146115855780634cc82215146114e257806359f0fc20146114a657806363c69f081461134057806367637b9114610ebb57806368a3a17714610c5657806380de66b714610c385780638ae7fea214610bad5780638efd471614610a2d5780639507d39a146108a95780639cfb82dc146106f2578063bde4acda146106a5578063bf708556146104e1578063c13e6cb8146104c3578063c2582669146104a5578063c4d66de81461034f578063cfad57a214610314578063d2e711c814610249578063d9a9d872146101ef578063e80225d0146101c9578063ed33a582146101a65763ef0bcc141461015b57600080fd5b346101a15760203660031901126101a157610174611aec565b61018c60018060a01b0360005460101c163314611b1e565b60ff8019600c54169115151617600c55600080f35b600080fd5b346101a15760003660031901126101a157602060ff600c54166040519015158152f35b346101a15760003660031901126101a157602060ff600c5460081c166040519015158152f35b346101a15760403660031901126101a1576024356001600160a01b038116908190036101a1576000526004602052602061023f600435604060002060019160005201602052604060002054151590565b6040519015158152f35b346101a15761025736611b08565b60015460405163ac4ab3fb60e01b81523360048201527fa66b7a3e6b19d24ccb6f717fc232a1bb0278a7f83f8e2211835fc4ed0fe69f19602482015291929190602090829060449082906001600160a01b03165afa8015610308576102c4916000916102da575b50611c41565b6000526003602052600b60406000200155600080f35b6102fb915060203d8111610301575b6102f38183611aca565b810190611c29565b846102be565b503d6102e9565b6040513d6000823e3d90fd5b346101a15760203660031901126101a15761034d6103306118ee565b61034860018060a01b0360005460101c163314611b1e565b611b50565b005b346101a15760203660031901126101a1576103686118ee565b6000549060ff8260081c161591828093610498575b8015610481575b156104255760ff19811660011760005582610413575b5060018060a01b03166bffffffffffffffffffffffff60a01b60015416176001556103c433611b50565b61012c8060095562ed4e00600a55600b556103db57005b61ff0019600054166000557f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498602060405160018152a1005b61ffff1916610101176000558261039a565b60405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608490fd5b50303b1580156103845750600160ff821614610384565b50600160ff82161061037d565b346101a15760003660031901126101a1576020600254604051908152f35b346101a15760003660031901126101a1576020600b54604051908152f35b346101a1576104ef36611918565b906104f982612464565b9160005b81811061051657604051806105128682611a4b565b0390f35b6105218183856123d4565b3560005260036020908082526040600020906040519261054084611aad565b825484526001808401546001600160a01b0390811683870152600285015416604080870191909152519284018054600093929161057c82611c8d565b808752918381169081156106805750600114610642575b5050505091816105ac600b9361063d9796950382611aca565b606084015260048101546080840152600581015460a0840152600681015460c0840152600781015460e084015260088082015460ff80821615156101008701529181901c821661012086015260101c1615156101408401526009810154610160840152600a81015461018084015201546101a082015261062c82876124b4565b5261063781866124b4565b50611c7e565b6104fd565b909192935060005282600020916000925b82841061066d57505050820101816105ac8161063d610593565b8054868501860152928401928101610653565b60ff1916858801525050151560051b840190910191508290506105ac8161063d610593565b346101a15760203660031901126101a1576106be611aec565b6106d660018060a01b0360005460101c163314611b1e565b61ff00600c5491151560081b169061ff00191617600c55600080f35b346101a1576020806003193601126101a1576004359060018060a01b03916107228360005460101c163314611b1e565b806000526003825260406000209260405161073c81611aad565b845481526001908282870154169185820192835283600288015416604083015260038701906040519160009181549161077483611c8d565b808652928281169081156108895750600114610852575b505050600397826107a36101a094600b940382611aca565b606085015260048101546080850152600581015460a0850152600681015460c0850152600781015460e085015260ff60088201548181161515610100870152818160081c1661012087015260101c1615156101408501526009810154610160850152600a810154610180850152015491015251166000526004825261082c8160406000206122e4565b5061083681612151565b506108408161223b565b506000525261034d6040600020611e87565b60009081528981209093505b828410610876575050508101860187826107a361078b565b80548585018b015292890192810161085e565b60ff19168b870152505050151560051b82018701905087826107a361078b565b346101a1576020806003193601126101a1576108c36123e4565b5060043560005260038152604060002090604051906108e182611aad565b825482526001808401546001600160a01b03908116838501526002850154166040808501919091525160038501805460009693909161091f83611c8d565b80855292828116908115610a0c57506001146109d2575b50505061094981600b9495960382611aca565b606085015260048101546080850152600581015460a0850152600681015460c0850152600781015460e085015260ff60088201548181161515610100870152818160081c1661012087015260101c1615156101408501526009810154610160850152600a81015461018085015201546101a0830152610512604051928284938452830190611965565b60009081528581209097505b8288106109f95750505093840182019361094981600b610936565b80548489018701529685019681016109de565b60ff191685880152505050151560051b81018301945061094981600b610936565b346101a15760203660031901126101a157600554600435818111610ba6575b610a5581612464565b9160005b828110610a6e57604051806105128682611a4b565b81811015610b9057807f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db00154600052600380602052604060002060405191610ab583611aad565b815483526001808301546001600160a01b03908116602086015260028401541660408086019190915251918301805460009291610af182611c8d565b80865291838116908115610b655750600114610b25575b50505091816105ac600b93610b209796950382611aca565b610a59565b909192506000526020600020916000925b828410610b50575050508101602001816105ac600b610b08565b81816020925483878901015201930192610b36565b60ff191660208088019190915292151560051b860190920193508492506105ac9150600b9050610b08565b634e487b7160e01b600052603260045260246000fd5b5080610a4c565b346101a15760203660031901126101a157600435610bd960018060a01b0360005460101c163314611b1e565b610be4811515611bf3565b600954811115610bf357600a55005b60405162461bcd60e51b815260206004820152601a60248201527f616d6f756e74203c206d61784d61726b65744f7264657254544c0000000000006044820152606490fd5b346101a15760003660031901126101a1576020600754604051908152f35b346101a157610c6436611b08565b9060075490818311610e7f5782820390828211610e5f5781811115610e7557509190915b610c9181612464565b926000925b828410610cab57604051806105128782611a4b565b808401808511610e5f5782811015610b90577fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68801546000526003936020858152604060002060405191610cfd83611aad565b8154835260018060a01b0397600198808a85015416838601526002840154166040850152820160405191600099825492610d3684611c8d565b80865293828116908115610e3c5750600114610dfa575b505050509081610d67600b93610df29798999a0382611aca565b606084015260048101546080840152600581015460a0840152600681015460c0840152600781015460e084015260088082015460ff80821615156101008701529181901c821661012086015260101c1615156101408401526009810154610160840152600a81015461018084015201546101a0820152610de782886124b4565b5261063781876124b4565b929190610c96565b9091929a50600052816000209960009a5b818c10610e29575050509781019097019680610d6781610df2610d4d565b8054858d018501529a83019a8201610e0b565b60ff19168487015250505090151560051b820101975080610d6781610df2610d4d565b634e487b7160e01b600052601160045260246000fd5b9050919091610c88565b60405162461bcd60e51b81526020600482015260146024820152734f6666736574206f7574206f6620626f756e647360601b6044820152606490fd5b346101a1576003196020368201126101a15767ffffffffffffffff600435116101a1576101c08091600435360301126101a15760405190810181811067ffffffffffffffff82111761130b57604052600435600401358152610f21602460043501611904565b6020820152610f34604460043501611904565b60408201526064600435013567ffffffffffffffff81116101a15760043501366023820112156101a157600481013567ffffffffffffffff811161130b5760405191610f8a601f8301601f191660200184611aca565b81835236602483830101116101a15781600092602460209301838601378301015260608201526004356084810135608083015260a481013560a083015260c481013560c083015260e481013560e0830152610fe89061010401611afb565b610100820152600435610124013560ff811690036101a157610124600435013561012082015261101d61014460043501611afb565b610140820152600480356101648101356101608401526101848101356101808401526101a401356101a083015260015460405163ac4ab3fb60e01b815233928101929092527fa66b7a3e6b19d24ccb6f717fc232a1bb0278a7f83f8e2211835fc4ed0fe69f196024830152602090829060449082906001600160a01b03165afa8015610308576110b4916000916113215750611c41565b6110bf600254611c7e565b80600255808252806000526003602052604060002091805183556001830160018060a01b03602083015116906bffffffffffffffffffffffff60a01b9182825416179055600284019060018060a01b0360408401511690825416179055606081015192835167ffffffffffffffff811161130b57806020956111446003850154611c8d565b601f81116112cd575b508690601f831160011461125e57600092611253575b50508160011b916000199060031b1c19161760038201555b6080820151600482015560a0820151600582015560c0820151600682015560e08201516007820155600881016101008301511515815461ff0061012086015160081b169060ff62ff0000610140880151151560101b1693169062ffffff191617171790556101608201516009820155610180820151600a820155600b6101a083015191015560018060a01b03838201511660005260048352611221826040600020611e30565b5061012081015160ff16611243576112399051611de3565b505b604051908152f35b61124d9051611d64565b5061123b565b015190508680611163565b92506003840160005286600020906000935b601f19841685106112b4576001945083601f1981161061129b575b505050811b01600382015561117b565b015160001960f88460031b161c1916905586808061128b565b8181015183559388019360019092019190880190611270565b6112fb906003860160005288600020601f850160051c8101918a8610611301575b601f0160051c0190611cc7565b8761114d565b90915081906112ee565b634e487b7160e01b600052604160045260246000fd5b61133a915060203d602011610301576102f38183611aca565b836102be565b346101a15760203660031901126101a1576001600160a01b036113616118ee565b1680600052600460205260406000205461137a81612464565b9160005b82811061139357604051806105128682611a4b565b8160005260046020526113aa816040600020611d4c565b9054600391821b1c600052806020526040600020604051916113cb83611aad565b815483526001808301546001600160a01b0390811660208601526002840154166040808601919091525191830180546000929161140782611c8d565b8086529183811690811561147b575060011461143b575b50505091816105ac600b936114369796950382611aca565b61137e565b909192506000526020600020916000925b828410611466575050508101602001816105ac600b61141e565b8181602092548387890101520193019261144c565b60ff191660208088019190915292151560051b860190920193508492506105ac9150600b905061141e565b346101a15760203660031901126101a1576004356114d260018060a01b0360005460101c163314611b1e565b6114dd811515611bf3565b600b55005b346101a15760203660031901126101a15760015460405163ac4ab3fb60e01b81523360048201527fa66b7a3e6b19d24ccb6f717fc232a1bb0278a7f83f8e2211835fc4ed0fe69f19602482015290602090829060449082906001600160a01b03165afa80156103085761155c916000916115675750611c41565b61034d600435611f1e565b61157f915060203d8111610301576102f38183611aca565b826102be565b346101a15760003660031901126101a1576001546040516001600160a01b039091168152602090f35b346101a1576115bc36611918565b906115d660005460018060a01b039060101c163314611b1e565b6000915b8083106115e357005b6115ee8382846123d4565b359283600052600360205260406000209360405161160b81611aad565b8554815260018601546001600160a01b03908116602083015260028701541660408083019190915251600387015460009061164581611c8d565b80845290600181169081156117805750600114611743575b509681611673600b9361173c98999a0382611aca565b606084015260048101546080840152600581015460a0840152600681015460c0840152600781015460e0840152600880820154809160ff92839182821615156101008901521c1661012086015260101c1615156101408401526009810154610160840152600a81015461018084015201546101a0820152602060018060a01b0391015116600052600460205261170d8160406000206122e4565b5061171781612151565b506117218161223b565b5060005260036020526117376040600020611e87565b611c7e565b91906115da565b9050600388016000526020600020906000915b81831061176a57505081016020018161165d565b6001816020925483868801015201920191611756565b60ff191660208086019190915291151560051b8401909101915082905061165d565b346101a15760003660031901126101a1576020600a54604051908152f35b346101a15760203660031901126101a1576001600160a01b036117e16118ee565b1660005260046020526020604060002054604051908152f35b346101a15760003660031901126101a1576020600554604051908152f35b346101a15760003660031901126101a1576020600954604051908152f35b346101a15760003660031901126101a15760005460405160109190911c6001600160a01b03168152602090f35b346101a15760203660031901126101a15760043561188f60018060a01b0360005460101c163314611b1e565b61189a811515611bf3565b600a548110156118a957600955005b60405162461bcd60e51b815260206004820152601b60248201527f616d6f756e74203e206d6178547269676765724f7264657254544c00000000006044820152606490fd5b600435906001600160a01b03821682036101a157565b35906001600160a01b03821682036101a157565b9060206003198301126101a15760043567ffffffffffffffff928382116101a157806023830112156101a15781600401359384116101a15760248460051b830101116101a1576024019190565b908151815260018060a01b036020908082850151168284015260408401511660408301526060830151906101c0918260608501528051809385015260005b838110611a36575050506101e09260008483850101526080810151608084015260a081015160a084015260c081015160c084015260e081015160e08401526101008082015115159084015261012060ff81830151169084015261014080820151151590840152610160808201519084015261018080820151908401526101a08091015190830152601f8019910116010190565b8181018301518582016101e0015282016119a3565b602080820190808352835180925260408301928160408460051b8301019501936000915b848310611a7f5750505050505090565b9091929394958480611a9d600193603f198682030187528a51611965565b9801930193019194939290611a6f565b6101c0810190811067ffffffffffffffff82111761130b57604052565b90601f8019910116810190811067ffffffffffffffff82111761130b57604052565b6004359081151582036101a157565b359081151582036101a157565b60409060031901126101a1576004359060243590565b15611b2557565b606460405162461bcd60e51b815260206004820152600460248201526310b3b7bb60e11b6044820152fd5b6001600160a01b03818116918215611bc2576000805462010000600160b01b03198116601093841b62010000600160b01b031617909155604080519190921c909216825260208201929092527f53351836099c03ffc3b1727d8abd4b0222afa87d4ed76ae3102d51369ef7f7859190a1565b60405162461bcd60e51b815260206004820152600960248201526810bd32b93796b3b7bb60b91b6044820152606490fd5b15611bfa57565b60405162461bcd60e51b815260206004820152600760248201526608585b5bdd5b9d60ca1b6044820152606490fd5b908160209103126101a1575180151581036101a15790565b15611c4857565b60405162461bcd60e51b815260206004820152600e60248201526d21636f6e74726163742d726f6c6560901b6044820152606490fd5b6000198114610e5f5760010190565b90600182811c92168015611cbd575b6020831014611ca757565b634e487b7160e01b600052602260045260246000fd5b91607f1691611c9c565b818110611cd2575050565b60008155600101611cc7565b600754811015610b905760076000527fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c6880190600090565b600554811015610b905760056000527f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db00190600090565b8054821015610b905760005260206000200190600090565b600081815260086020526040812054611dde57600754600160401b811015611dca579082611db6611d9d84600160409601600755611cde565b819391549060031b600019811b9283911b169119161790565b905560075492815260086020522055600190565b634e487b7160e01b82526041600452602482fd5b905090565b600081815260066020526040812054611dde57600554600160401b811015611dca579082611e1c611d9d84600160409601600555611d15565b905560055492815260066020522055600190565b6000828152600182016020526040902054611e8057805490600160401b82101561130b5782611e69611d9d846001809601855584611d4c565b905580549260005201602052604060002055600190565b5050600090565b600b6000918281558260018201558260028201558260038201611eaa8154611c8d565b80611edf575b5050600482015582600582015582600682015582600782015582600882015582600982015582600a8201550155565b601f8111600114611ef55750555b823880611eb0565b81835260208320611f1191601f0160051c810190600101611cc7565b8160208120915555611eed565b600090808252602060038152604080842091815191611f3c83611aad565b8354835260018060a01b039460019486868201541694848101958652876002830154168482015260038201845190818b825492611f7884611c8d565b938484528a8d821691826000146121315750506001146120f4575b50611fa092500382611aca565b6060820152600482015460808201526101a0600b6005840154938460a0850152600681015460c0850152600781015460e085015260ff60088201548181161515610100870152818160081c1661012087015260101c1615156101408501526009810154610160850152600a8101546101808501520154910152156120eb57600b9587945116845260048352612037818386206122e4565b5061204181612151565b5061204b8161223b565b50835260038252822092828455828185015582600285015560038401916120728354611c8d565b91826120aa575b50505050600482015582600582015582600682015582600782015582600882015582600982015582600a8201550155565b82601f8694116001146120c75750505050555b8238808080612079565b6120e191858552601f848620920160051c82019101611cc7565b81209155556120bd565b50505050505050565b9150508b5281878c8b8282205b858310612118575050611fa0935082010138611f93565b80919294505483858801015201910188908b8593612101565b60ff191685820152611fa095151560051b8501019250389150611f939050565b60008181526006602052604081205490919080156122365760001990808201818111612222576005549083820191821161220e578082036121da575b50505060055480156121c6578101906121a582611d15565b909182549160031b1b19169055600555815260066020526040812055600190565b634e487b7160e01b84526031600452602484fd5b6121f86121e9611d9d93611d15565b90549060031b1c928392611d15565b905584526006602052604084205538808061218d565b634e487b7160e01b86526011600452602486fd5b634e487b7160e01b85526011600452602485fd5b505090565b60008181526008602052604081205490919080156122365760001990808201818111612222576007549083820191821161220e578082036122b0575b50505060075480156121c65781019061228f82611cde565b909182549160031b1b19169055600755815260086020526040812055600190565b6122ce6122bf611d9d93611cde565b90549060031b1c928392611cde565b9055845260086020526040842055388080612277565b906001820190600092818452826020526040842054908115156000146123cd57600019918083018181116123b9578254908482019182116123a557808203612370575b5050508054801561235c5782019161233f8383611d4c565b909182549160031b1b191690555582526020526040812055600190565b634e487b7160e01b86526031600452602486fd5b612390612380611d9d9386611d4c565b90549060031b1c92839286611d4c565b90558652846020526040862055388080612327565b634e487b7160e01b88526011600452602488fd5b634e487b7160e01b87526011600452602487fd5b5050505090565b9190811015610b905760051b0190565b604051906123f182611aad565b816101a06000918281528260208201528260408201526060808201528260808201528260a08201528260c08201528260e082015282610100820152826101208201528261014082015282610160820152826101808201520152565b67ffffffffffffffff811161130b5760051b60200190565b9061246e8261244c565b61247b6040519182611aca565b828152809261248c601f199161244c565b019060005b82811061249d57505050565b6020906124a86123e4565b82828501015201612491565b8051821015610b905760209160051b01019056fea26469706673582212202019575cf561578fdff07d3ef574f336e2ac33a3768b1058022fc17c020ee7ac64736f6c63430008110033
Loading...
Loading
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in MON
Multichain Portfolio | 35 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
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.