Source Code
Overview
ETH Balance
0 ETH
Eth Value
$0.00Latest 19 from a total of 19 transactions
| Transaction Hash |
Method
|
Block
|
From
|
|
To
|
||||
|---|---|---|---|---|---|---|---|---|---|
| Set Expiry Price... | 23995252 | 89 days ago | IN | 0 ETH | 0.00017869 | ||||
| Set Expiry Price... | 23945464 | 96 days ago | IN | 0 ETH | 0.00017224 | ||||
| Set Expiry Price... | 23895875 | 103 days ago | IN | 0 ETH | 0.00017419 | ||||
| Set Expiry Price... | 23846087 | 110 days ago | IN | 0 ETH | 0.0007155 | ||||
| Set Expiry Price... | 23796122 | 117 days ago | IN | 0 ETH | 0.00020378 | ||||
| Set Expiry Price... | 23746088 | 124 days ago | IN | 0 ETH | 0.00022958 | ||||
| Set Expiry Price... | 23696037 | 131 days ago | IN | 0 ETH | 0.00018044 | ||||
| Set Expiry Price... | 23646274 | 138 days ago | IN | 0 ETH | 0.00018099 | ||||
| Set Expiry Price... | 23596614 | 145 days ago | IN | 0 ETH | 0.00037483 | ||||
| Set Expiry Price... | 23548946 | 152 days ago | IN | 0 ETH | 0.00033802 | ||||
| Set Expiry Price... | 23496661 | 159 days ago | IN | 0 ETH | 0.00013226 | ||||
| Set Expiry Price... | 23445925 | 166 days ago | IN | 0 ETH | 0.000166 | ||||
| Set Expiry Price... | 23345722 | 180 days ago | IN | 0 ETH | 0.00014336 | ||||
| Set Expiry Price... | 23295606 | 187 days ago | IN | 0 ETH | 0.00018929 | ||||
| Set Expiry Price... | 23245501 | 194 days ago | IN | 0 ETH | 0.00015857 | ||||
| Set Expiry Price... | 23195348 | 201 days ago | IN | 0 ETH | 0.0002544 | ||||
| Set Expiry Price... | 23145150 | 208 days ago | IN | 0 ETH | 0.00027583 | ||||
| Set Expiry Price... | 23095081 | 215 days ago | IN | 0 ETH | 0.00027063 | ||||
| Set Expiry Price... | 23016250 | 226 days ago | IN | 0 ETH | 0.00028852 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Similar Match Source Code This contract matches the deployed Bytecode of the Source Code for Contract 0x3250e0d6...40a865C86 The constructor portion of the code might be different and could alter the actual behaviour of the contract
Contract Name:
ManualPricer
Compiler Version
v0.6.10+commit.00c0fcaf
Optimization Enabled:
Yes with 200 runs
Other Settings:
istanbul EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.6.10;
import {OracleInterface} from "../interfaces/OracleInterface.sol";
import {OpynPricerInterface} from "../interfaces/OpynPricerInterface.sol";
import {SafeMath} from "../packages/oz/SafeMath.sol";
/**
* @notice A Pricer contract for one asset as reported by Manual entity
*/
contract ManualPricer is OpynPricerInterface {
using SafeMath for uint256;
/// @notice the opyn oracle address
OracleInterface public oracle;
/// @notice asset that this pricer will a get price for
address public asset;
/// @notice bot address that is allowed to call setExpiryPriceInOracle
address public bot;
/// @notice lastExpiryTimestamp last timestamp that asset price was set
uint256 public lastExpiryTimestamp;
/// @notice historicalPrice mapping of timestamp to price
mapping(uint256 => uint256) public historicalPrice;
/**
* @param _bot priveleged address that can call setExpiryPriceInOracle
* @param _asset asset that this pricer will get a price for
* @param _oracle Opyn Oracle address
*/
constructor(
address _bot,
address _asset,
address _oracle
) public {
require(_bot != address(0), "ManualPricer: Cannot set 0 address as bot");
require(_oracle != address(0), "ManualPricer: Cannot set 0 address as oracle");
bot = _bot;
oracle = OracleInterface(_oracle);
asset = _asset;
}
/**
* @notice modifier to check if sender address is equal to bot address
*/
modifier onlyBot() {
require(msg.sender == bot, "ManualPricer: unauthorized sender");
_;
}
/**
* @notice set the expiry price in the oracle, can only be called by Bot address
* @param _expiryTimestamp expiry to set a price for
* @param _price the price of the asset
*/
function setExpiryPriceInOracle(uint256 _expiryTimestamp, uint256 _price) external onlyBot {
lastExpiryTimestamp = _expiryTimestamp;
historicalPrice[_expiryTimestamp] = _price;
oracle.setExpiryPrice(asset, _expiryTimestamp, _price);
}
function getPrice() external view override returns (uint256) {}
/**
* @notice get the live price for the asset
* @dev overides the getPrice function in OpynPricerInterface
* @return price of the asset in USD, scaled by 1e8
*/
function getPrice(address) external view override returns (uint256) {
return historicalPrice[lastExpiryTimestamp];
}
/**
* @notice get historical chainlink price
* @param _roundId chainlink round id
* @return round price and timestamp
*/
function getHistoricalPrice(uint80 _roundId) external view override returns (uint256, uint256) {
revert("ManualPricer: Deprecated");
}
}// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.6.10;
interface OracleInterface {
function isLockingPeriodOver(address _asset, uint256 _expiryTimestamp) external view returns (bool);
function isDisputePeriodOver(address _asset, uint256 _expiryTimestamp) external view returns (bool);
function getExpiryPrice(address _asset, uint256 _expiryTimestamp) external view returns (uint256, bool);
function getDisputer() external view returns (address);
function getPricer(address _asset) external view returns (address);
function getPrice(address _asset) external view returns (uint256);
function getPricerLockingPeriod(address _pricer) external view returns (uint256);
function getPricerDisputePeriod(address _pricer) external view returns (uint256);
function getChainlinkRoundData(address _asset, uint80 _roundId) external view returns (uint256, uint256);
// Non-view function
function setAssetPricer(address _asset, address _pricer) external;
function setLockingPeriod(address _pricer, uint256 _lockingPeriod) external;
function setDisputePeriod(address _pricer, uint256 _disputePeriod) external;
function setExpiryPrice(
address _asset,
uint256 _expiryTimestamp,
uint256 _price
) external;
function disputeExpiryPrice(
address _asset,
uint256 _expiryTimestamp,
uint256 _price
) external;
function setDisputer(address _disputer) external;
}// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.6.10;
interface OpynPricerInterface {
function getPrice(address) external view returns (uint256);
function getPrice() external view returns (uint256);
function getHistoricalPrice(uint80 _roundId) external view returns (uint256, uint256);
}// SPDX-License-Identifier: MIT
// openzeppelin-contracts v3.1.0
/* solhint-disable */
pragma solidity ^0.6.0;
/**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming languages.
* `SafeMath` restores this intuition by reverting the transaction when an
* operation overflows.
*
* Using this library instead of the unchecked operations eliminates an entire
* class of bugs, so it's recommended to use it always.
*/
library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a, "SafeMath: addition overflow");
return c;
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
return sub(a, b, "SafeMath: subtraction overflow");
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
* - Subtraction cannot overflow.
*/
function sub(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
require(b <= a, errorMessage);
uint256 c = a - b;
return c;
}
/**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
* - Multiplication cannot overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
if (a == 0) {
return 0;
}
uint256 c = a * b;
require(c / a == b, "SafeMath: multiplication overflow");
return c;
}
/**
* @dev Returns the integer division of two unsigned integers. Reverts on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
return div(a, b, "SafeMath: division by zero");
}
/**
* @dev Returns the integer division of two unsigned integers. Reverts with custom message on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
* - The divisor cannot be zero.
*/
function div(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
// Solidity only automatically asserts when dividing by 0
require(b > 0, errorMessage);
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return c;
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
return mod(a, b, "SafeMath: modulo by zero");
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts with custom message when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
* - The divisor cannot be zero.
*/
function mod(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
require(b != 0, errorMessage);
return a % b;
}
}{
"remappings": [
"@ensdomains/=node_modules/@ensdomains/",
"@openzeppelin/=node_modules/@openzeppelin/",
"@solidity-parser/=node_modules/@solidity-parser/",
"eth-gas-reporter/=node_modules/eth-gas-reporter/",
"truffle/=node_modules/truffle/"
],
"optimizer": {
"enabled": true,
"runs": 200
},
"metadata": {
"useLiteralContent": false,
"bytecodeHash": "ipfs"
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"evmVersion": "istanbul",
"libraries": {}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"_bot","type":"address"},{"internalType":"address","name":"_asset","type":"address"},{"internalType":"address","name":"_oracle","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"asset","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"bot","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint80","name":"_roundId","type":"uint80"}],"name":"getHistoricalPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"getPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"historicalPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastExpiryTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"oracle","outputs":[{"internalType":"contract OracleInterface","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_expiryTimestamp","type":"uint256"},{"internalType":"uint256","name":"_price","type":"uint256"}],"name":"setExpiryPriceInOracle","outputs":[],"stateMutability":"nonpayable","type":"function"}]Contract Creation Code
0x608060405234801561001057600080fd5b506040516104e63803806104e68339818101604052606081101561003357600080fd5b50805160208201516040909201519091906001600160a01b0383166100895760405162461bcd60e51b81526004018080602001828103825260298152602001806104916029913960400191505060405180910390fd5b6001600160a01b0381166100ce5760405162461bcd60e51b815260040180806020018281038252602c8152602001806104ba602c913960400191505060405180910390fd5b600280546001600160a01b039485166001600160a01b0319918216179091556000805492851692821692909217909155600180549290931691161790556103778061011a6000396000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c80635c5ebfaf116100665780635c5ebfaf146101045780637dc0d1d0146101295780639737219d1461013157806398d5fdca1461014e578063eec377c01461015657610093565b806310814c371461009857806338d52e0f146100bc57806341976e09146100c45780634bf8a020146100fc575b600080fd5b6100a0610198565b604080516001600160a01b039092168252519081900360200190f35b6100a06101a7565b6100ea600480360360208110156100da57600080fd5b50356001600160a01b03166101b6565b60408051918252519081900360200190f35b6100ea6101cc565b6101276004803603604081101561011a57600080fd5b50803590602001356101d2565b005b6100a06102a8565b6100ea6004803603602081101561014757600080fd5b50356102b7565b6100ea6102c9565b61017f6004803603602081101561016c57600080fd5b503569ffffffffffffffffffff166102ce565b6040805192835260208301919091528051918290030190f35b6002546001600160a01b031681565b6001546001600160a01b031681565b5060035460009081526004602052604090205490565b60035481565b6002546001600160a01b0316331461021b5760405162461bcd60e51b81526004018080602001828103825260218152602001806103216021913960400191505060405180910390fd5b600382905560008281526004602081905260408083208490558254600154825163ee53140960e01b81526001600160a01b03918216948101949094526024840187905260448401869052915191169263ee531409926064808201939182900301818387803b15801561028c57600080fd5b505af11580156102a0573d6000803e3d6000fd5b505050505050565b6000546001600160a01b031681565b60046020526000908152604090205481565b600090565b6040805162461bcd60e51b815260206004820152601860248201527f4d616e75616c5072696365723a204465707265636174656400000000000000006044820152905160009182919081900360640190fdfe4d616e75616c5072696365723a20756e617574686f72697a65642073656e646572a26469706673582212206434c945ae047cdcdea667886d97d81cdaf19623f04327a34c958e947e163ca264736f6c634300060a00334d616e75616c5072696365723a2043616e6e6f74207365742030206164647265737320617320626f744d616e75616c5072696365723a2043616e6e6f742073657420302061646472657373206173206f7261636c65000000000000000000000000482b8cbaafe5b9145dc2f7841837d6d1db0bfc7f0000000000000000000000007f39c581f595b53c5cb19bd0b3f8da6c935e2ca0000000000000000000000000b5711daec960c9487d95ba327c570a7cce4982c0
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100935760003560e01c80635c5ebfaf116100665780635c5ebfaf146101045780637dc0d1d0146101295780639737219d1461013157806398d5fdca1461014e578063eec377c01461015657610093565b806310814c371461009857806338d52e0f146100bc57806341976e09146100c45780634bf8a020146100fc575b600080fd5b6100a0610198565b604080516001600160a01b039092168252519081900360200190f35b6100a06101a7565b6100ea600480360360208110156100da57600080fd5b50356001600160a01b03166101b6565b60408051918252519081900360200190f35b6100ea6101cc565b6101276004803603604081101561011a57600080fd5b50803590602001356101d2565b005b6100a06102a8565b6100ea6004803603602081101561014757600080fd5b50356102b7565b6100ea6102c9565b61017f6004803603602081101561016c57600080fd5b503569ffffffffffffffffffff166102ce565b6040805192835260208301919091528051918290030190f35b6002546001600160a01b031681565b6001546001600160a01b031681565b5060035460009081526004602052604090205490565b60035481565b6002546001600160a01b0316331461021b5760405162461bcd60e51b81526004018080602001828103825260218152602001806103216021913960400191505060405180910390fd5b600382905560008281526004602081905260408083208490558254600154825163ee53140960e01b81526001600160a01b03918216948101949094526024840187905260448401869052915191169263ee531409926064808201939182900301818387803b15801561028c57600080fd5b505af11580156102a0573d6000803e3d6000fd5b505050505050565b6000546001600160a01b031681565b60046020526000908152604090205481565b600090565b6040805162461bcd60e51b815260206004820152601860248201527f4d616e75616c5072696365723a204465707265636174656400000000000000006044820152905160009182919081900360640190fdfe4d616e75616c5072696365723a20756e617574686f72697a65642073656e646572a26469706673582212206434c945ae047cdcdea667886d97d81cdaf19623f04327a34c958e947e163ca264736f6c634300060a0033
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
0
Multichain Portfolio | 33 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.