Source Code
Overview
ETH Balance
ETH Value
$0.00Latest 1 from a total of 1 transactions
| Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
|---|---|---|---|---|---|---|---|---|---|
| Transfer Ownersh... | 4701717 | 659 days ago | IN | 0 ETH | 0.00010013 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Cross-Chain Transactions
Loading...
Loading
Contract Name:
ConstAprOracle
Compiler Version
v0.6.12+commit.27d51765
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity >=0.6.10 <0.8.0;
import "@openzeppelin/contracts/access/Ownable.sol";
import "../interfaces/IAprOracle.sol";
contract ConstAprOracle is IAprOracle, Ownable {
event Updated(uint256 dailyRate);
uint256 public dailyRate;
constructor(uint256 dailyRate_) public {
dailyRate = dailyRate_;
emit Updated(dailyRate_);
}
function update(uint256 newRate) external onlyOwner {
dailyRate = newRate;
emit Updated(newRate);
}
function capture() external override returns (uint256) {
return dailyRate;
}
}// SPDX-License-Identifier: MIT
pragma solidity >=0.6.0 <0.8.0;
import "../utils/Context.sol";
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
address msgSender = _msgSender();
_owner = msgSender;
emit OwnershipTransferred(address(0), msgSender);
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
_;
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
emit OwnershipTransferred(_owner, address(0));
_owner = address(0);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
emit OwnershipTransferred(_owner, newOwner);
_owner = newOwner;
}
}// SPDX-License-Identifier: MIT
pragma solidity >=0.6.0 <0.8.0;
/*
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with GSN meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address payable) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes memory) {
this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
return msg.data;
}
}// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity >=0.6.10 <0.8.0;
interface IAprOracle {
function capture() external returns (uint256 dailyRate);
}{
"optimizer": {
"enabled": true,
"runs": 200
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"libraries": {}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"uint256","name":"dailyRate_","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"dailyRate","type":"uint256"}],"name":"Updated","type":"event"},{"inputs":[],"name":"capture","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"dailyRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newRate","type":"uint256"}],"name":"update","outputs":[],"stateMutability":"nonpayable","type":"function"}]Contract Creation Code
608060405234801561001057600080fd5b506040516104d03803806104d08339818101604052602081101561003357600080fd5b5051600061003f6100c7565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a35060018190556040805182815290517f208509800c5cb9707f116ef96a1d456499ab9fa3c8edc1cdf381fe5216d5b1739181900360200190a1506100cb565b3390565b6103f6806100da6000396000f3fe608060405234801561001057600080fd5b50600436106100625760003560e01c8063715018a61461006757806374df19c31461007157806382ab890a1461008b5780638da5cb5b146100a8578063d4a3e9d7146100cc578063f2fde38b146100d4575b600080fd5b61006f6100fa565b005b6100796101b8565b60408051918252519081900360200190f35b61006f600480360360208110156100a157600080fd5b50356101be565b6100b061026d565b604080516001600160a01b039092168252519081900360200190f35b61007961027c565b61006f600480360360208110156100ea57600080fd5b50356001600160a01b0316610282565b610102610396565b6001600160a01b031661011361026d565b6001600160a01b03161461016e576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b60015481565b6101c6610396565b6001600160a01b03166101d761026d565b6001600160a01b031614610232576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b60018190556040805182815290517f208509800c5cb9707f116ef96a1d456499ab9fa3c8edc1cdf381fe5216d5b1739181900360200190a150565b6000546001600160a01b031690565b60015490565b61028a610396565b6001600160a01b031661029b61026d565b6001600160a01b0316146102f6576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b03811661033b5760405162461bcd60e51b815260040180806020018281038252602681526020018061039b6026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b339056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373a26469706673582212205b5bb407d3212ed8daab23d89cca944ac729d4cffe2699f5a31855c7e341323664736f6c634300060c00330000000000000000000000000000000000000000000000000000c7575fbb49a4
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100625760003560e01c8063715018a61461006757806374df19c31461007157806382ab890a1461008b5780638da5cb5b146100a8578063d4a3e9d7146100cc578063f2fde38b146100d4575b600080fd5b61006f6100fa565b005b6100796101b8565b60408051918252519081900360200190f35b61006f600480360360208110156100a157600080fd5b50356101be565b6100b061026d565b604080516001600160a01b039092168252519081900360200190f35b61007961027c565b61006f600480360360208110156100ea57600080fd5b50356001600160a01b0316610282565b610102610396565b6001600160a01b031661011361026d565b6001600160a01b03161461016e576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b60015481565b6101c6610396565b6001600160a01b03166101d761026d565b6001600160a01b031614610232576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b60018190556040805182815290517f208509800c5cb9707f116ef96a1d456499ab9fa3c8edc1cdf381fe5216d5b1739181900360200190a150565b6000546001600160a01b031690565b60015490565b61028a610396565b6001600160a01b031661029b61026d565b6001600160a01b0316146102f6576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b03811661033b5760405162461bcd60e51b815260040180806020018281038252602681526020018061039b6026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b339056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373a26469706673582212205b5bb407d3212ed8daab23d89cca944ac729d4cffe2699f5a31855c7e341323664736f6c634300060c0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000000000000000000000000000000000c7575fbb49a4
-----Decoded View---------------
Arg [0] : dailyRate_ (uint256): 219178082191780
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000c7575fbb49a4
Loading...
Loading
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
Multichain Portfolio | 35 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.