Overview
ETH Balance
0 ETH
ETH Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 96 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Set | 165368047 | 479 days ago | IN | 0 ETH | 0.00016192 | ||||
Set | 165368003 | 479 days ago | IN | 0 ETH | 0.00017675 | ||||
Set | 165367959 | 479 days ago | IN | 0 ETH | 0.00017244 | ||||
Set | 163588086 | 484 days ago | IN | 0 ETH | 0.00010176 | ||||
Set | 163588038 | 484 days ago | IN | 0 ETH | 0.00010936 | ||||
Set | 163587963 | 484 days ago | IN | 0 ETH | 0.0001013 | ||||
Set | 113114742 | 642 days ago | IN | 0 ETH | 0.00012955 | ||||
Set | 107874429 | 658 days ago | IN | 0 ETH | 0.00045759 | ||||
Set | 107727617 | 658 days ago | IN | 0 ETH | 0.0000779 | ||||
Set | 107727499 | 658 days ago | IN | 0 ETH | 0.00007803 | ||||
Set | 107404895 | 659 days ago | IN | 0 ETH | 0.00009105 | ||||
Set | 101677089 | 677 days ago | IN | 0 ETH | 0.00007803 | ||||
Set | 101676990 | 677 days ago | IN | 0 ETH | 0.00007987 | ||||
Set | 101676374 | 677 days ago | IN | 0 ETH | 0.00007831 | ||||
Set | 97989542 | 687 days ago | IN | 0 ETH | 0.00010176 | ||||
Set | 97989516 | 687 days ago | IN | 0 ETH | 0.00010396 | ||||
Set | 97989506 | 687 days ago | IN | 0 ETH | 0.00010249 | ||||
Set | 91271799 | 707 days ago | IN | 0 ETH | 0.00018266 | ||||
Set | 91265224 | 707 days ago | IN | 0 ETH | 0.00022489 | ||||
Set | 89849011 | 712 days ago | IN | 0 ETH | 0.0002048 | ||||
Set | 89558691 | 712 days ago | IN | 0 ETH | 0.00036807 | ||||
Set | 89338488 | 713 days ago | IN | 0 ETH | 0.00099288 | ||||
Set | 89338459 | 713 days ago | IN | 0 ETH | 0.00106654 | ||||
Set | 89338445 | 713 days ago | IN | 0 ETH | 0.00108232 | ||||
Set | 88462014 | 716 days ago | IN | 0 ETH | 0.00031313 |
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
72083972 | 763 days ago | 0 ETH | ||||
72083972 | 763 days ago | 0 ETH | ||||
72083946 | 763 days ago | 0 ETH | ||||
72083946 | 763 days ago | 0 ETH | ||||
72083041 | 763 days ago | 0 ETH | ||||
72083041 | 763 days ago | 0 ETH | ||||
72083021 | 763 days ago | 0 ETH | ||||
72082869 | 763 days ago | 0 ETH | ||||
72082869 | 763 days ago | 0 ETH | ||||
72082844 | 763 days ago | 0 ETH | ||||
72082468 | 763 days ago | 0 ETH | ||||
72082468 | 763 days ago | 0 ETH | ||||
72082468 | 763 days ago | 0 ETH | ||||
72082437 | 763 days ago | 0 ETH | ||||
72081661 | 763 days ago | 0 ETH | ||||
72081322 | 763 days ago | 0 ETH | ||||
72080816 | 763 days ago | 0 ETH | ||||
72080014 | 763 days ago | 0 ETH | ||||
72080014 | 763 days ago | 0 ETH | ||||
72079991 | 763 days ago | 0 ETH | ||||
72072061 | 763 days ago | 0 ETH | ||||
72072061 | 763 days ago | 0 ETH | ||||
72072030 | 763 days ago | 0 ETH | ||||
72071830 | 763 days ago | 0 ETH | ||||
72071830 | 763 days ago | 0 ETH |
Loading...
Loading
Contract Name:
MarketStore
Compiler Version
v0.8.17+commit.8df45f5f
Optimization Enabled:
Yes with 100 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: BUSL-1.1 pragma solidity 0.8.17; import '../utils/Roles.sol'; /// @title MarketStore /// @notice Persistent storage of supported markets contract MarketStore is Roles { // Market struct struct Market { string name; // Market's full name, e.g. Bitcoin / U.S. Dollar string category; // crypto, fx, commodities, or indices address chainlinkFeed; // Price feed contract address uint256 maxLeverage; // No decimals uint256 maxDeviation; // In bps, max price difference from oracle to chainlink price uint256 fee; // In bps. 10 = 0.1% uint256 liqThreshold; // In bps uint256 fundingFactor; // Yearly funding rate if OI is completely skewed to one side. In bps. uint256 minOrderAge; // Min order age before is can be executed. In seconds uint256 pythMaxAge; // Max Pyth submitted price age, in seconds bytes32 pythFeed; // Pyth price feed id bool allowChainlinkExecution; // Allow anyone to execute orders with chainlink bool isReduceOnly; // accepts only reduce only orders } // Constants to limit gov power uint256 public constant MAX_FEE = 1000; // 10% uint256 public constant MAX_DEVIATION = 1000; // 10% uint256 public constant MAX_LIQTHRESHOLD = 10000; // 100% uint256 public constant MAX_MIN_ORDER_AGE = 30; uint256 public constant MIN_PYTH_MAX_AGE = 3; // list of supported markets string[] public marketList; // "ETH-USD", "BTC-USD", etc mapping(string => Market) private markets; constructor(RoleStore rs) Roles(rs) {} /// @notice Set or update a market /// @dev Only callable by governance /// @param market String identifier, e.g. "ETH-USD" /// @param marketInfo Market struct containing required market data function set(string calldata market, Market memory marketInfo) external onlyGov { require(marketInfo.fee <= MAX_FEE, '!max-fee'); require(marketInfo.maxLeverage >= 1, '!max-leverage'); require(marketInfo.maxDeviation <= MAX_DEVIATION, '!max-deviation'); require(marketInfo.liqThreshold <= MAX_LIQTHRESHOLD, '!max-liqthreshold'); require(marketInfo.minOrderAge <= MAX_MIN_ORDER_AGE, '!max-minorderage'); require(marketInfo.pythMaxAge >= MIN_PYTH_MAX_AGE, '!min-pythmaxage'); markets[market] = marketInfo; for (uint256 i = 0; i < marketList.length; i++) { // check if market already exists, if yes return if (keccak256(abi.encodePacked(marketList[i])) == keccak256(abi.encodePacked(market))) return; } marketList.push(market); } /// @notice Returns market struct of `market` /// @param market String identifier, e.g. "ETH-USD" function get(string calldata market) external view returns (Market memory) { return markets[market]; } /// @notice Returns market struct array of specified markets /// @param _markets Array of market strings, e.g. ["ETH-USD", "BTC-USD"] function getMany(string[] calldata _markets) external view returns (Market[] memory) { uint256 length = _markets.length; Market[] memory _marketInfos = new Market[](length); for (uint256 i = 0; i < length; i++) { _marketInfos[i] = markets[_markets[i]]; } return _marketInfos; } /// @notice Returns market identifier at `index` /// @param index index of marketList function getMarketByIndex(uint256 index) external view returns (string memory) { return marketList[index]; } /// @notice Get a list of all supported markets function getMarketList() external view returns (string[] memory) { return marketList; } /// @notice Get number of supported markets function getMarketCount() external view returns (uint256) { return marketList.length; } }
// SPDX-License-Identifier: BUSL-1.1 pragma solidity 0.8.17; import './Governable.sol'; import '../stores/RoleStore.sol'; /// @title Roles /// @notice Role-based access control mechanism via onlyContract modifier contract Roles is Governable { bytes32 public constant CONTRACT = keccak256('CONTRACT'); RoleStore public roleStore; /// @dev Initializes roleStore address constructor(RoleStore rs) Governable() { roleStore = rs; } /// @dev Reverts if caller address has not the contract role modifier onlyContract() { require(roleStore.hasRole(msg.sender, CONTRACT), '!contract-role'); _; } }
// SPDX-License-Identifier: BUSL-1.1 pragma solidity 0.8.17; /// @title Governable /// @notice Basic access control mechanism, gov has access to certain functions contract Governable { address public gov; event SetGov(address prevGov, address nextGov); /// @dev Initializes the contract setting the deployer address as governance constructor() { _setGov(msg.sender); } /// @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 { address prevGov = gov; gov = _gov; emit SetGov(prevGov, _gov); } }
// SPDX-License-Identifier: BUSL-1.1 pragma solidity 0.8.17; import '@openzeppelin/contracts/utils/structs/EnumerableSet.sol'; import '../utils/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; // Set of roles EnumerableSet.Bytes32Set internal roles; // Role -> address mapping(bytes32 => EnumerableSet.AddressSet) internal roleMembers; constructor() Governable() {} /// @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)); } /// @notice Revokes `role` from `account` /// @dev Only callable by governance function revokeRole(address account, bytes32 role) external onlyGov { require(roleMembers[role].remove(account)); // 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.7.0) (utils/structs/EnumerableSet.sol) pragma solidity ^0.8.0; /** * @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) { return _values(set._inner); } // 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 on 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; } }
{ "viaIR": true, "optimizer": { "enabled": true, "runs": 100 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"contract RoleStore","name":"rs","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"prevGov","type":"address"},{"indexed":false,"internalType":"address","name":"nextGov","type":"address"}],"name":"SetGov","type":"event"},{"inputs":[],"name":"CONTRACT","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_DEVIATION","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_FEE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_LIQTHRESHOLD","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_MIN_ORDER_AGE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MIN_PYTH_MAX_AGE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"market","type":"string"}],"name":"get","outputs":[{"components":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"category","type":"string"},{"internalType":"address","name":"chainlinkFeed","type":"address"},{"internalType":"uint256","name":"maxLeverage","type":"uint256"},{"internalType":"uint256","name":"maxDeviation","type":"uint256"},{"internalType":"uint256","name":"fee","type":"uint256"},{"internalType":"uint256","name":"liqThreshold","type":"uint256"},{"internalType":"uint256","name":"fundingFactor","type":"uint256"},{"internalType":"uint256","name":"minOrderAge","type":"uint256"},{"internalType":"uint256","name":"pythMaxAge","type":"uint256"},{"internalType":"bytes32","name":"pythFeed","type":"bytes32"},{"internalType":"bool","name":"allowChainlinkExecution","type":"bool"},{"internalType":"bool","name":"isReduceOnly","type":"bool"}],"internalType":"struct MarketStore.Market","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string[]","name":"_markets","type":"string[]"}],"name":"getMany","outputs":[{"components":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"category","type":"string"},{"internalType":"address","name":"chainlinkFeed","type":"address"},{"internalType":"uint256","name":"maxLeverage","type":"uint256"},{"internalType":"uint256","name":"maxDeviation","type":"uint256"},{"internalType":"uint256","name":"fee","type":"uint256"},{"internalType":"uint256","name":"liqThreshold","type":"uint256"},{"internalType":"uint256","name":"fundingFactor","type":"uint256"},{"internalType":"uint256","name":"minOrderAge","type":"uint256"},{"internalType":"uint256","name":"pythMaxAge","type":"uint256"},{"internalType":"bytes32","name":"pythFeed","type":"bytes32"},{"internalType":"bool","name":"allowChainlinkExecution","type":"bool"},{"internalType":"bool","name":"isReduceOnly","type":"bool"}],"internalType":"struct MarketStore.Market[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getMarketByIndex","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getMarketCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getMarketList","outputs":[{"internalType":"string[]","name":"","type":"string[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"gov","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"marketList","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"roleStore","outputs":[{"internalType":"contract RoleStore","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"market","type":"string"},{"components":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"category","type":"string"},{"internalType":"address","name":"chainlinkFeed","type":"address"},{"internalType":"uint256","name":"maxLeverage","type":"uint256"},{"internalType":"uint256","name":"maxDeviation","type":"uint256"},{"internalType":"uint256","name":"fee","type":"uint256"},{"internalType":"uint256","name":"liqThreshold","type":"uint256"},{"internalType":"uint256","name":"fundingFactor","type":"uint256"},{"internalType":"uint256","name":"minOrderAge","type":"uint256"},{"internalType":"uint256","name":"pythMaxAge","type":"uint256"},{"internalType":"bytes32","name":"pythFeed","type":"bytes32"},{"internalType":"bool","name":"allowChainlinkExecution","type":"bool"},{"internalType":"bool","name":"isReduceOnly","type":"bool"}],"internalType":"struct MarketStore.Market","name":"marketInfo","type":"tuple"}],"name":"set","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_gov","type":"address"}],"name":"setGov","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
6080346100ad57601f6113f738819003918201601f19168301916001600160401b038311848410176100b2578084926020946040528339810103126100ad57516001600160a01b03808216918290036100ad577f53351836099c03ffc3b1727d8abd4b0222afa87d4ed76ae3102d51369ef7f785604060005460018060a01b0319933385831617600055825191168152336020820152a1600154161760015560405161132e90816100c98239f35b600080fd5b634e487b7160e01b600052604160045260246000fdfe608060408181526004918236101561001657600080fd5b60009260e08435811c92836312d43a51146108bc57508263232b956c1461086d5782633d4db043146108505782634a4a7b0414610826578263565f129f146108085782635b9907a414610726578263693ec85e14610617578263a073f1db146104ae578263af4b9d3d1461042c578263b05f233a1461041f578263b1b52666146101d957508163bc063e1a146101cd578163cfad57a21461014e57508063dd4c2eb614610133578063fc833ac6146100f95763fd69f3c2146100d8575b600080fd5b346100f557816003193601126100f5576020906002549051908152f35b5080fd5b50346100f557816003193601126100f557602090517fa66b7a3e6b19d24ccb6f717fc232a1bb0278a7f83f8e2211835fc4ed0fe69f198152f35b50346100f557816003193601126100f5576020905160038152f35b9050346101c95760203660031901126101c957356001600160a01b0381811692918390036101c557827f53351836099c03ffc3b1727d8abd4b0222afa87d4ed76ae3102d51369ef7f785938554928316926101aa843314610bdd565b6001600160a01b03191617855582519182526020820152a180f35b8380fd5b8280fd5b505050506100d3610bbf565b848285346101c9576020806003193601126101c55782356001600160401b039586821161041b573660238301121561041b57818501359487861161041757600597602436888b1b860182011161041357610238889598999796996112cd565b976102458751998a61097d565b858952601f19610254876112cd565b01885b8181106103ef575050368190036042190190885b8c8882106102ce578c8c8c8c8051938080860192818752855180945283818801981b870101940192955b8287106102a25785850386f35b9091929382806102be600193603f198a82030186528851610ab1565b9601920196019592919092610295565b8185919d9a9b9d1b83010135838112156103eb57820184810135908682116103e7576044019080360382136103e7576103cd8f938e8e6103de968f959687859884519283378101908781600393848152030190209280519761032f8961094b565b6103388561099e565b89526103466001860161099e565b9089015260028401546001600160a01b03169088015282015460608701528c820154608087015281015460a0860152600681015460c086015260078101548d8601526008808201546101008701526009820154610120870152600a820154610140870152600b9091015460ff8082161515610160880152911c1615156101808501526112e4565b526103d8818d6112e4565b50610c63565b9a98979a61026b565b8d80fd5b8c80fd5b9a8b8b82809b9c9e6104029b969b61126a565b92010152019a98979a969196610257565b8880fd5b8680fd5b8580fd5b50505050506100d3610bbf565b508284346104ab5760203660031901126104ab5782359260025484101561049857506002905261049491610481907f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace0161099e565b9051918291602083526020830190610a44565b0390f35b634e487b7160e01b825260329052602490fd5b80fd5b849184346101c557600319918183360112610613576001600160401b03938135858111610417576104e29036908401610a84565b93909260243596808811610413576101a08097893603011261041357825196870187811082821117610600578352878201358181116105fc5761052a908336918b0101610b5c565b8752602488013590811161041357610546913691890101610b5c565b60208601526001600160a01b03906044870135908282168203610413576105f9976105f4946105e493610184938a0152606482013560608a0152608482013560808a015260a482013560a08a015260c482013560c08a015260e4820135908901526101048101356101008901526101248101356101208901526101448101356101408901526105d86101648201610bb2565b61016089015201610bb2565b6101808601528654163314610bdd565b610c88565b80f35b8980fd5b634e487b7160e01b8a526041835260248afd5b8480fd5b908385346104ab5760203660031901126104ab578235906001600160401b0382116104ab5750600b61049494602061065460ff9436908801610a84565b919061065e61126a565b508287519384928337810160038152030190209084519561067e8761094b565b6106878361099e565b87526106956001840161099e565b602088015260018060a01b0360028401541686880152600383015460608801528201546080870152600582015460a0870152600682015460c087015260078201549086015260088101546101008601526009810154610120860152600a8101546101408601520154818116151561016085015260081c16151561018083015251918291602083526020830190610ab1565b8385346104ab57806003193601126104ab57600254610744816112cd565b916107518451938461097d565b8183526002815260209283810192827f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace855b8383106107e457505050508451938085019181865251809252858501958260051b8601019392955b8287106107b85785850386f35b9091929382806107d4600193603f198a82030186528851610a44565b96019201960195929190926107ab565b60018881926107f6859b98999b61099e565b81520192019201919096949396610783565b505050346100f557816003193601126100f557602090516127108152f35b505050346100f557816003193601126100f55760015490516001600160a01b039091168152602090f35b505050346100f557816003193601126100f55760209051601e8152f35b508284346104ab5760203660031901126104ab5782356002548110156100f557610896906108e0565b9390936108aa57610494836104818661099e565b634e487b7160e01b8252819052602490fd5b8590346100f557816003193601126100f55790546001600160a01b03168152602090f35b6002548110156108fb57600260005260206000200190600090565b634e487b7160e01b600052603260045260246000fd5b90600182811c92168015610941575b602083101461092b57565b634e487b7160e01b600052602260045260246000fd5b91607f1691610920565b6101a081019081106001600160401b0382111761096757604052565b634e487b7160e01b600052604160045260246000fd5b90601f801991011681019081106001600160401b0382111761096757604052565b90604051918260008254926109b284610911565b908184526001948581169081600014610a2157506001146109de575b50506109dc9250038361097d565b565b9093915060005260209081600020936000915b818310610a095750506109dc935082010138806109ce565b855488840185015294850194879450918301916109f1565b9150506109dc94506020925060ff191682840152151560051b82010138806109ce565b919082519283825260005b848110610a70575050826000602080949584010152601f8019910116010190565b602081830181015184830182015201610a4f565b9181601f840112156100d3578235916001600160401b0383116100d357602083818601950101116100d357565b90610ada610ac883516101a0808552840190610a44565b60208401518382036020850152610a44565b9160018060a01b036040820151166040830152606081015160608301526080810151608083015260a081015160a083015260c081015160c083015260e081015160e08301526101008082015190830152610120808201519083015261014080820151908301526101608082015115159083015261018080910151151591015290565b81601f820112156100d3578035906001600160401b0382116109675760405192610b90601f8401601f19166020018561097d565b828452602083830101116100d357816000926020809301838601378301015290565b359081151582036100d357565b50346100d35760003660031901126100d35760206040516103e88152f35b15610be457565b606460405162461bcd60e51b815260206004820152600460248201526310b3b7bb60e11b6044820152fd5b90601f8111610c1d57505050565b600091825260208220906020601f850160051c83019410610c59575b601f0160051c01915b828110610c4e57505050565b818155600101610c42565b9092508290610c39565b6000198114610c725760010190565b634e487b7160e01b600052601160045260246000fd5b92916103e88060a08301511161123a576001606083015110611205576080820151116111cf5761271060c08201511161119657601e6101008201511161115e576003610120820151106111275760405182858237602081848101600381520301902081518051906001600160401b038211610967578190610d1382610d0d8654610911565b86610c0f565b602090601f83116001146110bb576000926110b0575b50508160011b916000199060031b1c19161781555b60208201518051906001600160401b03821161096757610d6e82610d656001860154610911565b60018601610c0f565b602090601f831160011461103d57600b93929160009183611032575b50508160011b916000199060031b1c19161760018201555b6002810160018060a01b0360408501511660018060a01b0319825416179055606083015160038201556080830151600482015560a0830151600582015560c0830151600682015560e0830151600782015561010083015160088201556101208301516009820155610140830151600a820155019061016081015115159060ff61ff006101808554930151151560081b1692169061ffff1916171790556000600254905b818110610f425750600160401b81101561096757806001610e6992016002556108e0565b919091610f2c576001600160401b03811161096757610e9281610e8c8454610911565b84610c0f565b6000601f8211600114610ecc5781929394600092610ec1575b50508160011b916000199060031b1c1916179055565b013590503880610eab565b601f198216948382526020822091805b878110610f14575083600195969710610efa575b505050811b019055565b0135600019600384901b60f8161c19169055388080610ef0565b90926020600181928686013581550194019101610edc565b634e487b7160e01b600052600060045260246000fd5b610f4b816108e0565b506040516020810191816000825492610f6384610911565b93600181169081156110145750600114610fd2575b50610f8c925003601f19810183528261097d565b519020604051602081019085888337610fb560208288810160008382015203808452018261097d565b51902014610fcb57610fc690610c63565b610e45565b5050509050565b9150506000528160206000206000905b838210610ffa5750506020610f8c9282010138610f78565b602091925080600191548385880101520191018391610fe2565b60ff1916875250610f8c938015150283016020019150389050610f78565b015190503880610d8a565b906001840160005260206000209160005b601f19851681106110985750918391600193600b9695601f1981161061107f575b505050811b016001820155610da2565b015160001960f88460031b161c1916905538808061106f565b9192602060018192868501518155019401920161104e565b015190503880610d29565b9250836000526020600020906000935b601f198416851061110c576001945083601f198116106110f3575b505050811b018155610d3e565b015160001960f88460031b161c191690553880806110e6565b818101518355602094850194600190930192909101906110cb565b60405162461bcd60e51b815260206004820152600f60248201526e216d696e2d707974686d617861676560881b6044820152606490fd5b60405162461bcd60e51b815260206004820152601060248201526f216d61782d6d696e6f7264657261676560801b6044820152606490fd5b60405162461bcd60e51b8152602060048201526011602482015270085b585e0b5b1a5c5d1a1c995cda1bdb19607a1b6044820152606490fd5b60405162461bcd60e51b815260206004820152600e60248201526d10b6b0bc16b232bb34b0ba34b7b760911b6044820152606490fd5b60405162461bcd60e51b815260206004820152600d60248201526c216d61782d6c6576657261676560981b6044820152606490fd5b60405162461bcd60e51b8152602060048201526008602482015267216d61782d66656560c01b6044820152606490fd5b604051906112778261094b565b8160608152606060208201526101806000918260408201528260608201528260808201528260a08201528260c08201528260e0820152826101008201528261012082015282610140820152826101608201520152565b6001600160401b0381116109675760051b60200190565b80518210156108fb5760209160051b01019056fea2646970667358221220b0670d9b7bda4e1c5fb28374eb308abd7a6c455b3c458081347fcc71d8ac332a64736f6c63430008110033000000000000000000000000e5da4704a582fe799dcd1dff31dc2ed2e0bdc961
Deployed Bytecode
0x608060408181526004918236101561001657600080fd5b60009260e08435811c92836312d43a51146108bc57508263232b956c1461086d5782633d4db043146108505782634a4a7b0414610826578263565f129f146108085782635b9907a414610726578263693ec85e14610617578263a073f1db146104ae578263af4b9d3d1461042c578263b05f233a1461041f578263b1b52666146101d957508163bc063e1a146101cd578163cfad57a21461014e57508063dd4c2eb614610133578063fc833ac6146100f95763fd69f3c2146100d8575b600080fd5b346100f557816003193601126100f5576020906002549051908152f35b5080fd5b50346100f557816003193601126100f557602090517fa66b7a3e6b19d24ccb6f717fc232a1bb0278a7f83f8e2211835fc4ed0fe69f198152f35b50346100f557816003193601126100f5576020905160038152f35b9050346101c95760203660031901126101c957356001600160a01b0381811692918390036101c557827f53351836099c03ffc3b1727d8abd4b0222afa87d4ed76ae3102d51369ef7f785938554928316926101aa843314610bdd565b6001600160a01b03191617855582519182526020820152a180f35b8380fd5b8280fd5b505050506100d3610bbf565b848285346101c9576020806003193601126101c55782356001600160401b039586821161041b573660238301121561041b57818501359487861161041757600597602436888b1b860182011161041357610238889598999796996112cd565b976102458751998a61097d565b858952601f19610254876112cd565b01885b8181106103ef575050368190036042190190885b8c8882106102ce578c8c8c8c8051938080860192818752855180945283818801981b870101940192955b8287106102a25785850386f35b9091929382806102be600193603f198a82030186528851610ab1565b9601920196019592919092610295565b8185919d9a9b9d1b83010135838112156103eb57820184810135908682116103e7576044019080360382136103e7576103cd8f938e8e6103de968f959687859884519283378101908781600393848152030190209280519761032f8961094b565b6103388561099e565b89526103466001860161099e565b9089015260028401546001600160a01b03169088015282015460608701528c820154608087015281015460a0860152600681015460c086015260078101548d8601526008808201546101008701526009820154610120870152600a820154610140870152600b9091015460ff8082161515610160880152911c1615156101808501526112e4565b526103d8818d6112e4565b50610c63565b9a98979a61026b565b8d80fd5b8c80fd5b9a8b8b82809b9c9e6104029b969b61126a565b92010152019a98979a969196610257565b8880fd5b8680fd5b8580fd5b50505050506100d3610bbf565b508284346104ab5760203660031901126104ab5782359260025484101561049857506002905261049491610481907f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace0161099e565b9051918291602083526020830190610a44565b0390f35b634e487b7160e01b825260329052602490fd5b80fd5b849184346101c557600319918183360112610613576001600160401b03938135858111610417576104e29036908401610a84565b93909260243596808811610413576101a08097893603011261041357825196870187811082821117610600578352878201358181116105fc5761052a908336918b0101610b5c565b8752602488013590811161041357610546913691890101610b5c565b60208601526001600160a01b03906044870135908282168203610413576105f9976105f4946105e493610184938a0152606482013560608a0152608482013560808a015260a482013560a08a015260c482013560c08a015260e4820135908901526101048101356101008901526101248101356101208901526101448101356101408901526105d86101648201610bb2565b61016089015201610bb2565b6101808601528654163314610bdd565b610c88565b80f35b8980fd5b634e487b7160e01b8a526041835260248afd5b8480fd5b908385346104ab5760203660031901126104ab578235906001600160401b0382116104ab5750600b61049494602061065460ff9436908801610a84565b919061065e61126a565b508287519384928337810160038152030190209084519561067e8761094b565b6106878361099e565b87526106956001840161099e565b602088015260018060a01b0360028401541686880152600383015460608801528201546080870152600582015460a0870152600682015460c087015260078201549086015260088101546101008601526009810154610120860152600a8101546101408601520154818116151561016085015260081c16151561018083015251918291602083526020830190610ab1565b8385346104ab57806003193601126104ab57600254610744816112cd565b916107518451938461097d565b8183526002815260209283810192827f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace855b8383106107e457505050508451938085019181865251809252858501958260051b8601019392955b8287106107b85785850386f35b9091929382806107d4600193603f198a82030186528851610a44565b96019201960195929190926107ab565b60018881926107f6859b98999b61099e565b81520192019201919096949396610783565b505050346100f557816003193601126100f557602090516127108152f35b505050346100f557816003193601126100f55760015490516001600160a01b039091168152602090f35b505050346100f557816003193601126100f55760209051601e8152f35b508284346104ab5760203660031901126104ab5782356002548110156100f557610896906108e0565b9390936108aa57610494836104818661099e565b634e487b7160e01b8252819052602490fd5b8590346100f557816003193601126100f55790546001600160a01b03168152602090f35b6002548110156108fb57600260005260206000200190600090565b634e487b7160e01b600052603260045260246000fd5b90600182811c92168015610941575b602083101461092b57565b634e487b7160e01b600052602260045260246000fd5b91607f1691610920565b6101a081019081106001600160401b0382111761096757604052565b634e487b7160e01b600052604160045260246000fd5b90601f801991011681019081106001600160401b0382111761096757604052565b90604051918260008254926109b284610911565b908184526001948581169081600014610a2157506001146109de575b50506109dc9250038361097d565b565b9093915060005260209081600020936000915b818310610a095750506109dc935082010138806109ce565b855488840185015294850194879450918301916109f1565b9150506109dc94506020925060ff191682840152151560051b82010138806109ce565b919082519283825260005b848110610a70575050826000602080949584010152601f8019910116010190565b602081830181015184830182015201610a4f565b9181601f840112156100d3578235916001600160401b0383116100d357602083818601950101116100d357565b90610ada610ac883516101a0808552840190610a44565b60208401518382036020850152610a44565b9160018060a01b036040820151166040830152606081015160608301526080810151608083015260a081015160a083015260c081015160c083015260e081015160e08301526101008082015190830152610120808201519083015261014080820151908301526101608082015115159083015261018080910151151591015290565b81601f820112156100d3578035906001600160401b0382116109675760405192610b90601f8401601f19166020018561097d565b828452602083830101116100d357816000926020809301838601378301015290565b359081151582036100d357565b50346100d35760003660031901126100d35760206040516103e88152f35b15610be457565b606460405162461bcd60e51b815260206004820152600460248201526310b3b7bb60e11b6044820152fd5b90601f8111610c1d57505050565b600091825260208220906020601f850160051c83019410610c59575b601f0160051c01915b828110610c4e57505050565b818155600101610c42565b9092508290610c39565b6000198114610c725760010190565b634e487b7160e01b600052601160045260246000fd5b92916103e88060a08301511161123a576001606083015110611205576080820151116111cf5761271060c08201511161119657601e6101008201511161115e576003610120820151106111275760405182858237602081848101600381520301902081518051906001600160401b038211610967578190610d1382610d0d8654610911565b86610c0f565b602090601f83116001146110bb576000926110b0575b50508160011b916000199060031b1c19161781555b60208201518051906001600160401b03821161096757610d6e82610d656001860154610911565b60018601610c0f565b602090601f831160011461103d57600b93929160009183611032575b50508160011b916000199060031b1c19161760018201555b6002810160018060a01b0360408501511660018060a01b0319825416179055606083015160038201556080830151600482015560a0830151600582015560c0830151600682015560e0830151600782015561010083015160088201556101208301516009820155610140830151600a820155019061016081015115159060ff61ff006101808554930151151560081b1692169061ffff1916171790556000600254905b818110610f425750600160401b81101561096757806001610e6992016002556108e0565b919091610f2c576001600160401b03811161096757610e9281610e8c8454610911565b84610c0f565b6000601f8211600114610ecc5781929394600092610ec1575b50508160011b916000199060031b1c1916179055565b013590503880610eab565b601f198216948382526020822091805b878110610f14575083600195969710610efa575b505050811b019055565b0135600019600384901b60f8161c19169055388080610ef0565b90926020600181928686013581550194019101610edc565b634e487b7160e01b600052600060045260246000fd5b610f4b816108e0565b506040516020810191816000825492610f6384610911565b93600181169081156110145750600114610fd2575b50610f8c925003601f19810183528261097d565b519020604051602081019085888337610fb560208288810160008382015203808452018261097d565b51902014610fcb57610fc690610c63565b610e45565b5050509050565b9150506000528160206000206000905b838210610ffa5750506020610f8c9282010138610f78565b602091925080600191548385880101520191018391610fe2565b60ff1916875250610f8c938015150283016020019150389050610f78565b015190503880610d8a565b906001840160005260206000209160005b601f19851681106110985750918391600193600b9695601f1981161061107f575b505050811b016001820155610da2565b015160001960f88460031b161c1916905538808061106f565b9192602060018192868501518155019401920161104e565b015190503880610d29565b9250836000526020600020906000935b601f198416851061110c576001945083601f198116106110f3575b505050811b018155610d3e565b015160001960f88460031b161c191690553880806110e6565b818101518355602094850194600190930192909101906110cb565b60405162461bcd60e51b815260206004820152600f60248201526e216d696e2d707974686d617861676560881b6044820152606490fd5b60405162461bcd60e51b815260206004820152601060248201526f216d61782d6d696e6f7264657261676560801b6044820152606490fd5b60405162461bcd60e51b8152602060048201526011602482015270085b585e0b5b1a5c5d1a1c995cda1bdb19607a1b6044820152606490fd5b60405162461bcd60e51b815260206004820152600e60248201526d10b6b0bc16b232bb34b0ba34b7b760911b6044820152606490fd5b60405162461bcd60e51b815260206004820152600d60248201526c216d61782d6c6576657261676560981b6044820152606490fd5b60405162461bcd60e51b8152602060048201526008602482015267216d61782d66656560c01b6044820152606490fd5b604051906112778261094b565b8160608152606060208201526101806000918260408201528260608201528260808201528260a08201528260c08201528260e0820152826101008201528261012082015282610140820152826101608201520152565b6001600160401b0381116109675760051b60200190565b80518210156108fb5760209160051b01019056fea2646970667358221220b0670d9b7bda4e1c5fb28374eb308abd7a6c455b3c458081347fcc71d8ac332a64736f6c63430008110033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000e5da4704a582fe799dcd1dff31dc2ed2e0bdc961
-----Decoded View---------------
Arg [0] : rs (address): 0xe5DA4704a582Fe799dcd1dFF31dc2eD2e0BdC961
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000e5da4704a582fe799dcd1dff31dc2ed2e0bdc961
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 34 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.