Contract 0xbaB6d0B770b9970e9FF2aF9A7e2a52b3D7aA157f 2

Txn Hash Method
Block
From
To
Value [Txn Fee]
0x7a0b6904d4a5c4ce3a6badf1179e96a5e7ccdccfa922c8e5bea5cbefb9c14b6aTransfer Ownersh...76480452021-12-01 2:01:50300 days 7 hrs ago0x3f09e942b0089b8af73ccb9603da8064b6c4b637 IN  0xbab6d0b770b9970e9ff2af9a7e2a52b3d7aa157f0 AVAX0.00077503507127.098180879
0xa10bbb6baf121b01d873af28b324d66a0680ed8e7add660b341ddf421ef5591d0x6080604076476332021-12-01 1:47:57300 days 7 hrs ago0x3f09e942b0089b8af73ccb9603da8064b6c4b637 IN  Create: Oracle0 AVAX0.00973531064525.924672111
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Oracle

Compiler Version
v0.8.6+commit.11564f7e

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, None license

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 5 : Oracle.sol
pragma solidity 0.8.6;


import "Ownable.sol";
import "IOracle.sol";
import "IPriceOracle.sol";


contract Oracle is IOracle, Ownable {

    IPriceOracle private _priceOracle;
    bool private _defaultPayIsAUTO;


    constructor(IPriceOracle priceOracle, bool defaultPayIsAUTO) Ownable() {
        _priceOracle = priceOracle;
        _defaultPayIsAUTO = defaultPayIsAUTO;
    }


    function getRandNum(uint seed) external override view returns (uint) {
        return uint(blockhash(seed));
    }

    function getPriceOracle() external override view returns (IPriceOracle) {
        return _priceOracle;
    }

    function getAUTOPerETH() external override view returns (uint) {
        return _priceOracle.getAUTOPerETH();
    }

    function getGasPriceFast() external override view returns (uint) {
        return _priceOracle.getGasPriceFast();
    }

    function setPriceOracle(IPriceOracle newPriceOracle) external override onlyOwner {
        _priceOracle = newPriceOracle;
    }

    function defaultPayIsAUTO() external override view returns (bool) {
        return _defaultPayIsAUTO;
    }

    function setDefaultPayIsAUTO(bool newDefaultPayIsAUTO) external override onlyOwner {
        _defaultPayIsAUTO = newDefaultPayIsAUTO;
    }
}

File 2 of 5 : Ownable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "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() {
        _setOwner(_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 {
        _setOwner(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");
        _setOwner(newOwner);
    }

    function _setOwner(address newOwner) private {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 3 of 5 : Context.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
}

File 4 of 5 : IOracle.sol
pragma solidity 0.8.6;


import "IPriceOracle.sol";


interface IOracle {
    // Needs to output the same number for the whole epoch
    function getRandNum(uint salt) external view returns (uint);

    function getPriceOracle() external view returns (IPriceOracle);

    function getAUTOPerETH() external view returns (uint);

    function getGasPriceFast() external view returns (uint);

    function setPriceOracle(IPriceOracle newPriceOracle) external;

    function defaultPayIsAUTO() external view returns (bool);

    function setDefaultPayIsAUTO(bool newDefaultPayIsAUTO) external;
}

File 5 of 5 : IPriceOracle.sol
pragma solidity 0.8.6;


interface IPriceOracle {

    function getAUTOPerETH() external view returns (uint);

    function getGasPriceFast() external view returns (uint);
}

Settings
{
  "evmVersion": "istanbul",
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "abi"
      ]
    }
  }
}

Contract ABI

[{"inputs":[{"internalType":"contract IPriceOracle","name":"priceOracle","type":"address"},{"internalType":"bool","name":"defaultPayIsAUTO","type":"bool"}],"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"},{"inputs":[],"name":"defaultPayIsAUTO","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAUTOPerETH","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getGasPriceFast","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getPriceOracle","outputs":[{"internalType":"contract IPriceOracle","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"seed","type":"uint256"}],"name":"getRandNum","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":"bool","name":"newDefaultPayIsAUTO","type":"bool"}],"name":"setDefaultPayIsAUTO","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IPriceOracle","name":"newPriceOracle","type":"address"}],"name":"setPriceOracle","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b506040516105fd3803806105fd83398101604081905261002f916100b8565b61003833610068565b60018054911515600160a01b026001600160a81b03199092166001600160a01b0390931692909217179055610103565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600080604083850312156100cb57600080fd5b82516001600160a01b03811681146100e257600080fd5b602084015190925080151581146100f857600080fd5b809150509250929050565b6104eb806101126000396000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c80639e26d580116100665780639e26d58014610127578063ba19f12f1461012f578063f1b8dac914610137578063f2fde38b1461014a578063fca513a81461015d57600080fd5b8063530e784f146100a357806364cf42ef146100b85780636c3f914c146100da578063715018a6146100fa5780638da5cb5b14610102575b600080fd5b6100b66100b13660046103f3565b61016e565b005b600154600160a01b900460ff1660405190151581526020015b60405180910390f35b6100ec6100e8366004610439565b4090565b6040519081526020016100d1565b6100b66101c3565b6000546001600160a01b03165b6040516001600160a01b0390911681526020016100d1565b6100ec6101f9565b6100ec61027b565b6100b6610145366004610417565b6102c0565b6100b66101583660046103f3565b610308565b6001546001600160a01b031661010f565b6000546001600160a01b031633146101a15760405162461bcd60e51b81526004016101989061046b565b60405180910390fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146101ed5760405162461bcd60e51b81526004016101989061046b565b6101f760006103a3565b565b6001546040805163013c4dab60e71b815290516000926001600160a01b031691639e26d580916004808301926020929190829003018186803b15801561023e57600080fd5b505afa158015610252573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102769190610452565b905090565b6001546040805163ba19f12f60e01b815290516000926001600160a01b03169163ba19f12f916004808301926020929190829003018186803b15801561023e57600080fd5b6000546001600160a01b031633146102ea5760405162461bcd60e51b81526004016101989061046b565b60018054911515600160a01b0260ff60a01b19909216919091179055565b6000546001600160a01b031633146103325760405162461bcd60e51b81526004016101989061046b565b6001600160a01b0381166103975760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610198565b6103a0816103a3565b50565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006020828403121561040557600080fd5b8135610410816104a0565b9392505050565b60006020828403121561042957600080fd5b8135801515811461041057600080fd5b60006020828403121561044b57600080fd5b5035919050565b60006020828403121561046457600080fd5b5051919050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6001600160a01b03811681146103a057600080fdfea2646970667358221220c407c8a12c8bf644604478199ad074cad94fe5a166877161a3b9f83164384c3364736f6c634300080600330000000000000000000000009118dbc12dc5979dabce6782739b020b8908a6cb0000000000000000000000000000000000000000000000000000000000000000

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

0000000000000000000000009118dbc12dc5979dabce6782739b020b8908a6cb0000000000000000000000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : priceOracle (address): 0x9118dbc12dc5979dabce6782739b020b8908a6cb
Arg [1] : defaultPayIsAUTO (bool): False

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 0000000000000000000000009118dbc12dc5979dabce6782739b020b8908a6cb
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000000


Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.