Contract 0x082917694cec266c55637466d923b36b821c46e6

Contract Overview

Balance:
0 AVAX
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x3212be46119ebc9c7cd67a6bbe1fa16c748b428f82fd14f99b43bbb71f52ff55Set Token Price ...187823582023-02-09 12:18:413 mins ago0x8ae449127eed88859a4d1d68e32bbfb2b78c71fb IN 0x082917694cec266c55637466d923b36b821c46e60 AVAX0.0008255545 26.5
0xb2572aae741da76266a88d0d7d7d9d75fcf0b683a86b4b64a6e17d891b505568Set Token Price ...187823562023-02-09 12:18:373 mins ago0x8ae449127eed88859a4d1d68e32bbfb2b78c71fb IN 0x082917694cec266c55637466d923b36b821c46e60 AVAX0.0007516725 26.5
0x489747aa7cc2cc6950a02be0798f71fda1440dc096e603d9b1c59df479762342Set Token Price ...187822502023-02-09 12:13:278 mins ago0x8ae449127eed88859a4d1d68e32bbfb2b78c71fb IN 0x082917694cec266c55637466d923b36b821c46e60 AVAX0.0008258725 26.5
0x5d5815112f0e61bdde836ad640476dab4149fb2ae9d599572fcfdfcb046fd89eSet Token Price ...187822492023-02-09 12:13:208 mins ago0x8ae449127eed88859a4d1d68e32bbfb2b78c71fb IN 0x082917694cec266c55637466d923b36b821c46e60 AVAX0.0007516725 26.5
0xcf57ff2469c243b39113d0ca3776d6f4a6a19269a9c0e2021768f351401566e6Set Token Price ...187821622023-02-09 12:08:1613 mins ago0x8ae449127eed88859a4d1d68e32bbfb2b78c71fb IN 0x082917694cec266c55637466d923b36b821c46e60 AVAX0.0008258725 26.5
0xf729d908213a1493d98898b98c3b017ccf25c9b18b5bb2e2b3a2e40047eca287Set Token Price ...187821592023-02-09 12:08:0913 mins ago0x8ae449127eed88859a4d1d68e32bbfb2b78c71fb IN 0x082917694cec266c55637466d923b36b821c46e60 AVAX0.0008258725 26.5
0x6abe64fbca79c7e310a7de610f22b3d327f1184b12155e9c99c9e3e8a45fae0bSet Token Price ...187820652023-02-09 12:02:5718 mins ago0x8ae449127eed88859a4d1d68e32bbfb2b78c71fb IN 0x082917694cec266c55637466d923b36b821c46e60 AVAX0.0008255545 26.5
0xbb66f0d389c7eecaa0559f7e133f98ce3bc77c6f05d5e9742a8a878c929cf3f2Set Token Price ...187820642023-02-09 12:02:5318 mins ago0x8ae449127eed88859a4d1d68e32bbfb2b78c71fb IN 0x082917694cec266c55637466d923b36b821c46e60 AVAX0.0008258725 26.5
0x6edb549cd34314269ef46eb602cd286f1340cdd7b40048b0f7cdbe6deaca0ed2Set Token Price ...187819992023-02-09 12:00:1521 mins ago0x8ae449127eed88859a4d1d68e32bbfb2b78c71fb IN 0x082917694cec266c55637466d923b36b821c46e60 AVAX0.0008258725 26.5
0x3e4985e7fb976a57d718809367553f65b9fc314c5da09b417eb4edfcd60d9411Set Token Price ...187819962023-02-09 12:00:0921 mins ago0x8ae449127eed88859a4d1d68e32bbfb2b78c71fb IN 0x082917694cec266c55637466d923b36b821c46e60 AVAX0.0008258725 26.5
0xc967edf95497325f7d19d68460bc30a97f2baac32f325f4595a952b841ae0b1dSet Token Price ...187819372023-02-09 11:57:4723 mins ago0x8ae449127eed88859a4d1d68e32bbfb2b78c71fb IN 0x082917694cec266c55637466d923b36b821c46e60 AVAX0.0008258725 26.5
0x73ed243b71e083dd3926c854c2f7beea6eccb6960ff78a94d6969df50b2e450fSet Token Price ...187819342023-02-09 11:57:4124 mins ago0x8ae449127eed88859a4d1d68e32bbfb2b78c71fb IN 0x082917694cec266c55637466d923b36b821c46e60 AVAX0.0007516725 26.5
0x8c0f174c7bfe0dd0e55c76b65c1e59c21b07d347fd93f29f8f08b9fa26675ba5Set Token Price ...187818882023-02-09 11:55:0426 mins ago0x8ae449127eed88859a4d1d68e32bbfb2b78c71fb IN 0x082917694cec266c55637466d923b36b821c46e60 AVAX0.0008258725 26.5
0xb3c097c5279f1a8e6726173ee4e11338eb11be4a3b385917ced8d7f21dc4e055Set Token Price ...187818852023-02-09 11:54:5826 mins ago0x8ae449127eed88859a4d1d68e32bbfb2b78c71fb IN 0x082917694cec266c55637466d923b36b821c46e60 AVAX0.0008258725 26.5
0x0ef3e5040aa9f7aea106630b9a9eb866c87c79a12afaea018c05d43ff711141aSet Token Price ...187818482023-02-09 11:52:3629 mins ago0x8ae449127eed88859a4d1d68e32bbfb2b78c71fb IN 0x082917694cec266c55637466d923b36b821c46e60 AVAX0.0008255545 26.5
0x23c6e97778500889f311bbce6ae54b10e1235dc861441a0269810fba2beb8087Set Token Price ...187818462023-02-09 11:52:3229 mins ago0x8ae449127eed88859a4d1d68e32bbfb2b78c71fb IN 0x082917694cec266c55637466d923b36b821c46e60 AVAX0.0007516725 26.5
0x3e7005e84b1803fb8a5ca3591468bc8278ebbd160dc50443280c9cf30b941712Set Token Price ...187817982023-02-09 11:49:5131 mins ago0x8ae449127eed88859a4d1d68e32bbfb2b78c71fb IN 0x082917694cec266c55637466d923b36b821c46e60 AVAX0.0008255545 26.5
0x6c3f033be10a12d9a6157a0e28071e0c944d52ca9198a1d43ea4a07ff12f7ea2Set Token Price ...187817942023-02-09 11:49:4232 mins ago0x8ae449127eed88859a4d1d68e32bbfb2b78c71fb IN 0x082917694cec266c55637466d923b36b821c46e60 AVAX0.0008258725 26.5
0x6da062a89afaebfaf745f456d2793678fcb86a49fc3adbff6360c1b367ad1ab9Set Token Price ...187817552023-02-09 11:47:2634 mins ago0x8ae449127eed88859a4d1d68e32bbfb2b78c71fb IN 0x082917694cec266c55637466d923b36b821c46e60 AVAX0.0008258725 26.5
0xcb9d44f504e9903ef00055849e616496738469bedb1a185437317e001eba8733Set Token Price ...187817542023-02-09 11:47:2234 mins ago0x8ae449127eed88859a4d1d68e32bbfb2b78c71fb IN 0x082917694cec266c55637466d923b36b821c46e60 AVAX0.0007516725 26.5
0xa4115a82c75cc8ffb94b5682ce4850051879f07a91d2c6228bbd964e0fd6f0beSet Token Price ...187816692023-02-09 11:42:1939 mins ago0x8ae449127eed88859a4d1d68e32bbfb2b78c71fb IN 0x082917694cec266c55637466d923b36b821c46e60 AVAX0.0008258725 26.5
0x4859ec9e839c0401a79a35392f6e9a8306ed3f5ea91f73e1e9811130f725ea6bSet Token Price ...187816672023-02-09 11:42:0939 mins ago0x8ae449127eed88859a4d1d68e32bbfb2b78c71fb IN 0x082917694cec266c55637466d923b36b821c46e60 AVAX0.0008258725 26.5
0x6997fc965837f0eecc103f998a8970b1a06091027651d3eb4ba4d89f427b113bSet Token Price ...187815702023-02-09 11:37:0544 mins ago0x8ae449127eed88859a4d1d68e32bbfb2b78c71fb IN 0x082917694cec266c55637466d923b36b821c46e60 AVAX0.0008255545 26.5
0x631a4d8d10402b4034b78a011c020b93ac28efbe36a0c73596917306a52fab84Set Token Price ...187815682023-02-09 11:37:0144 mins ago0x8ae449127eed88859a4d1d68e32bbfb2b78c71fb IN 0x082917694cec266c55637466d923b36b821c46e60 AVAX0.0008258725 26.5
0xbcb8c781aff02e6f0ccd9575373be48b3624cb153fc561cee8ff7af252797aa5Set Token Price ...187814692023-02-09 11:31:5549 mins ago0x8ae449127eed88859a4d1d68e32bbfb2b78c71fb IN 0x082917694cec266c55637466d923b36b821c46e60 AVAX0.0008258725 26.5
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0x368973b80aa66bac2f2cd8fe584b2e873693d8b0440ec5c33250db4cb56ebac9187736682023-02-09 6:00:186 hrs 21 mins ago 0xffc533a16bd7f3b1f879f86e4281bbe995e8ae370x082917694cec266c55637466d923b36b821c46e60 AVAX
0x107843aee4a02882dda855303e95c5e06f689e5505740c4b62601e25da3ee771187732342023-02-09 5:39:336 hrs 42 mins ago 0xffc533a16bd7f3b1f879f86e4281bbe995e8ae370x082917694cec266c55637466d923b36b821c46e60 AVAX
0x3e0afd2476960aa0d5ca7c2efd89707227dce1ef22784d623352dbea341a42fb187726342023-02-09 5:04:577 hrs 16 mins ago 0xffc533a16bd7f3b1f879f86e4281bbe995e8ae370x082917694cec266c55637466d923b36b821c46e60 AVAX
0xa6ba8e31663da2dd17c700ffebd5cb1d32312b1c3c1701f08ba1e5b1ec798616187704612023-02-09 2:56:259 hrs 25 mins ago 0xffc533a16bd7f3b1f879f86e4281bbe995e8ae370x082917694cec266c55637466d923b36b821c46e60 AVAX
0x766f6055bbe01576d8f63bb8a67102448a75287d245a63b69dbb8142eb902e28187702882023-02-09 2:45:249 hrs 36 mins ago 0xffc533a16bd7f3b1f879f86e4281bbe995e8ae370x082917694cec266c55637466d923b36b821c46e60 AVAX
0x23ea7ee4ce156467bd05bed281d5ace85fa25d699123c4385ce6b0969153d969187701512023-02-09 2:38:329 hrs 43 mins ago 0xffc533a16bd7f3b1f879f86e4281bbe995e8ae370x082917694cec266c55637466d923b36b821c46e60 AVAX
0x3f1252b1319044f808145fbe27ae552f5cf292f88c0bfad7e184796578c80033187699982023-02-09 2:27:529 hrs 53 mins ago 0xffc533a16bd7f3b1f879f86e4281bbe995e8ae370x082917694cec266c55637466d923b36b821c46e60 AVAX
0xe1e840cb7530b19cbe0946883279fcae565c37cf220196480b6ee12cd5cd822b187697002023-02-09 2:07:1310 hrs 14 mins ago 0xffc533a16bd7f3b1f879f86e4281bbe995e8ae370x082917694cec266c55637466d923b36b821c46e60 AVAX
0x1c5172b2269adac4f8426b50ee5d67ba52eea647d4850fbcdce087af6bb88dc4187694212023-02-09 1:52:2010 hrs 29 mins ago 0x0bb79ee47e6215456f656e267228b33648a5944c0x082917694cec266c55637466d923b36b821c46e60 AVAX
0x116d877c81c3eebbad3df77bf538b637a8e1b7f8a01e8207e8cb36ffa8e4dda5187693652023-02-09 1:48:3610 hrs 33 mins ago 0x0bb79ee47e6215456f656e267228b33648a5944c0x082917694cec266c55637466d923b36b821c46e60 AVAX
0x67c269aa54f2f9e326abcda0c684c6058285bba79e09181341fdcae78280c5c6187692912023-02-09 1:42:5910 hrs 38 mins ago 0x0bb79ee47e6215456f656e267228b33648a5944c0x082917694cec266c55637466d923b36b821c46e60 AVAX
0xd516d6618a1f6aa264dc8082888b7b03cc108d32d213a8b9584cc37584162c86187657532023-02-08 22:07:1814 hrs 14 mins ago 0xffc533a16bd7f3b1f879f86e4281bbe995e8ae370x082917694cec266c55637466d923b36b821c46e60 AVAX
0xaee4d2f8f6e1aa5c7ae274911a2eba371268a74385f2e9b5aa6e618547bd8ea7187655862023-02-08 21:59:3914 hrs 22 mins ago 0xffc533a16bd7f3b1f879f86e4281bbe995e8ae370x082917694cec266c55637466d923b36b821c46e60 AVAX
0x7fc81fea9396a369a7d665bfab5f24e3cb25d7cd566b47c2cbf814fb91595196187654342023-02-08 21:53:0914 hrs 28 mins ago 0x0bb79ee47e6215456f656e267228b33648a5944c0x082917694cec266c55637466d923b36b821c46e60 AVAX
0x7ba70be75b3d2479f54700f2c7da6a4bf28801797e2486343bca455e0e54655c187607352023-02-08 17:49:5718 hrs 31 mins ago 0xffc533a16bd7f3b1f879f86e4281bbe995e8ae370x082917694cec266c55637466d923b36b821c46e60 AVAX
0x7be0ff0e3653ab7c2e78ca025dd2c1668c1b487d3d9365a301fe12fa898e7f87187574832023-02-08 15:05:1921 hrs 16 mins ago 0xffc533a16bd7f3b1f879f86e4281bbe995e8ae370x082917694cec266c55637466d923b36b821c46e60 AVAX
0x9971518e09a945365f91e23b618fe124cd3f3d9ce71f29da31463909e22dabad187574502023-02-08 15:03:5321 hrs 17 mins ago 0xffc533a16bd7f3b1f879f86e4281bbe995e8ae370x082917694cec266c55637466d923b36b821c46e60 AVAX
0xe75ebd2a6be170cc271f3fffbd4342532f5136a0af615407f15e148ced07392b187574442023-02-08 15:03:3621 hrs 18 mins ago 0xffc533a16bd7f3b1f879f86e4281bbe995e8ae370x082917694cec266c55637466d923b36b821c46e60 AVAX
0x946640fa0ed7efe603b125e82d05f044889d1ad6260ca5a19973a228db81e862187572742023-02-08 14:56:2021 hrs 25 mins ago 0xffc533a16bd7f3b1f879f86e4281bbe995e8ae370x082917694cec266c55637466d923b36b821c46e60 AVAX
0x1deeb9f88276c1d9545fbcc54b36bf738287b7d4180029ba441d5ed39c363412187413202023-02-08 2:38:371 day 9 hrs ago 0xffc533a16bd7f3b1f879f86e4281bbe995e8ae370x082917694cec266c55637466d923b36b821c46e60 AVAX
0x6810d2e794582581fd5f68e3535ea486baaf6ec7e7320037d3248daf1208dfab187412412023-02-08 2:34:241 day 9 hrs ago 0xffc533a16bd7f3b1f879f86e4281bbe995e8ae370x082917694cec266c55637466d923b36b821c46e60 AVAX
0x7a3756ec96755b56cab687e045c615cb4e98c402a6caa47e46c5d1dac2390729187358542023-02-07 20:52:111 day 15 hrs ago 0xffc533a16bd7f3b1f879f86e4281bbe995e8ae370x082917694cec266c55637466d923b36b821c46e60 AVAX
0x91a70966fabcfce5c5d689f6d010cca93c685e95c6575cc9840d161afc7f8992187353882023-02-07 20:24:531 day 15 hrs ago 0xffc533a16bd7f3b1f879f86e4281bbe995e8ae370x082917694cec266c55637466d923b36b821c46e60 AVAX
0xd353dfbd2307d4008dcd76a82600b667fc2b0843e5230393a8cab155246e7f74187350162023-02-07 20:06:151 day 16 hrs ago 0xffc533a16bd7f3b1f879f86e4281bbe995e8ae370x082917694cec266c55637466d923b36b821c46e60 AVAX
0x626a8b2c9d2b0adc43db5926754f8d592503f56dcc106739f23bdfd16149d2bf187340612023-02-07 19:14:051 day 17 hrs ago 0xffc533a16bd7f3b1f879f86e4281bbe995e8ae370x082917694cec266c55637466d923b36b821c46e60 AVAX
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
LoadPriceHandler

Compiler Version
v0.8.14+commit.80d49f37

Optimization Enabled:
Yes with 500 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 4 : LoadPriceHandler.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.14;

import "@openzeppelin/contracts/access/Ownable.sol";
import "../libraries/ILoadPriceHandler.sol";

contract LoadPriceHandler is Ownable, ILoadPriceHandler {
    event TokenPriceUpdated(address indexed sender, address indexed token, uint256 newPrice);
    event HealingDollarsPerHPUpdated(address indexed sender, uint256 indexed newPrice);
    event ResurrectionDollarsUpdated(address indexed sender, uint256 indexed newPrice);
    event BardSongDollarsUpdated(address indexed sender, uint256 indexed newPrice);
    event InnRestDollarsUpdated(address indexed sender, uint256 indexed newPrice);
    event TokenDollarsRewardPerLevelUpdated(address indexed sender, uint256 indexed newPrice);
    event InnRestLevelMultiplierDollarsUpdated(address indexed sender, uint256 indexed newPrice);
    event DCARBondPriceUpdated(address indexed sender, uint256 indexed newPrice);
    event UpdatePriceOracle(address indexed newPriceOracle);

    address public PRICE_ORACLE;

    uint256 public constant DOLLAR_PRECISION = 1e18;

    uint256 public HEALING_DOLLARS_PER_HP = 25;

    uint256 public RESURRECTION_DOLLARS_PER_LEVEL = 2500;

    uint256 public BARD_SONG_DOLLARS = 1 * DOLLAR_PRECISION;

    uint256 public INN_REST_DOLLARS = 3 * DOLLAR_PRECISION;

    uint256 public INN_REST_LEVEL_MULTIPLIER_DOLLARS = 25;

    uint256 public TOKEN_DOLLARS_REWARD_PER_LEVEL = 20;

    uint256 public DCAR_BOND_PRICE = 100 * DOLLAR_PRECISION;

    address public immutable DCAR_CONTRACT_ADDRESS;
    address public immutable DCAU_CONTRACT_ADDRESS;

    mapping(address => uint256) public TokensPerDollar;

    constructor(
        address priceOracle,
        address dcauContract,
        address dcarContract
    ) {
        require(priceOracle != address(0), "must be valid address");
        require(dcauContract != address(0), "must be valid address");
        require(dcarContract != address(0), "must be valid address");

        PRICE_ORACLE = priceOracle;
        DCAU_CONTRACT_ADDRESS = dcauContract;
        DCAR_CONTRACT_ADDRESS = dcarContract;
    }

    function setHealingPrice(uint256 amount) external onlyOwner {
        require(amount > 0, "CANNOT_BE_ZERO");

        HEALING_DOLLARS_PER_HP = amount;

        emit HealingDollarsPerHPUpdated(msg.sender, amount);
    }

    function setResurrectionPricePerLevel(uint256 amount) external onlyOwner {
        require(amount > 0, "CANNOT_BE_ZERO");

        RESURRECTION_DOLLARS_PER_LEVEL = amount;

        emit ResurrectionDollarsUpdated(msg.sender, amount);
    }

    function setBardSongPrice(uint256 amount) external onlyOwner {
        require(amount > 0, "CANNOT_BE_ZERO");

        BARD_SONG_DOLLARS = amount;

        emit BardSongDollarsUpdated(msg.sender, amount);
    }

    function setInnRestPrice(uint256 amount) external onlyOwner {
        require(amount > 0, "CANNOT_BE_ZERO");

        INN_REST_DOLLARS = amount;

        emit InnRestDollarsUpdated(msg.sender, amount);
    }

    function setRewardPerLevelPrice(uint256 amount) external onlyOwner {
        require(amount > 0, "CANNOT_BE_ZERO");

        TOKEN_DOLLARS_REWARD_PER_LEVEL = amount;

        emit TokenDollarsRewardPerLevelUpdated(msg.sender, amount);
    }

    function setInnRestLevelMultiplierDollars(uint256 amount) external onlyOwner {
        require(amount > 0, "CANNOT_BE_ZERO");

        INN_REST_LEVEL_MULTIPLIER_DOLLARS = amount;

        emit InnRestLevelMultiplierDollarsUpdated(msg.sender, amount);
    }

    function setTokenPricePerDollar(address tokenAddress, uint256 amountPerDollar) external {
        require(tokenAddress != address(0), "INVALID_TOKEN_ADDRESS");
        require(msg.sender == PRICE_ORACLE, "ORACLE_ONLY");

        TokensPerDollar[tokenAddress] = amountPerDollar;

        emit TokenPriceUpdated(msg.sender, tokenAddress, amountPerDollar);
    }

    function setDCARBondPrice(uint256 priceInDollars) external {
        require(msg.sender == PRICE_ORACLE, "ORACLE_ONLY");

        DCAR_BOND_PRICE = priceInDollars;

        emit DCARBondPriceUpdated(msg.sender, priceInDollars);
    }

    function tokensPerDollar(address tokenAddress) public view returns (uint256) {
        require(tokenAddress != address(0), "INVALID_TOKEN_ADDRESS");
        require(TokensPerDollar[tokenAddress] > 0, "PRICE_NOT_SET");
        return TokensPerDollar[tokenAddress];
    }

    function tokenCostDCARBond(address tokenAddress, uint256 discount) external view returns (uint256) {
        uint256 totalTokenCost = tokensPerDollar(tokenAddress) * DCAR_BOND_PRICE;
        uint256 discountInTokens = (totalTokenCost * discount) / 1000;
        uint256 discountedTokenPrice = totalTokenCost - discountInTokens;

        return discountedTokenPrice;
    }

    function totalCostHeal(uint256 amount) external view returns (uint256) {
        uint256 costInDollars = HEALING_DOLLARS_PER_HP * amount;
        return (costInDollars * tokensPerDollar(DCAU_CONTRACT_ADDRESS)) / DOLLAR_PRECISION;
    }

    function costToResurrect(uint256 level) external view returns (uint256) {
        uint256 costInDollars = RESURRECTION_DOLLARS_PER_LEVEL * level;
        return (costInDollars * tokensPerDollar(DCAU_CONTRACT_ADDRESS)) / DOLLAR_PRECISION;
    }

    function bardSongCost() external view returns (uint256) {
        return (BARD_SONG_DOLLARS * tokensPerDollar(DCAU_CONTRACT_ADDRESS)) / DOLLAR_PRECISION;
    }

    function innRestCost(uint256 level) external view returns (uint256) {
        uint256 levelCostDollars = INN_REST_LEVEL_MULTIPLIER_DOLLARS * level;
        return ((INN_REST_DOLLARS + levelCostDollars) * tokensPerDollar(DCAU_CONTRACT_ADDRESS)) / DOLLAR_PRECISION;
    }

    function costFromStableCost(address tokenAddress, uint256 amountInDollars) external view returns (uint256) {
        require(tokenAddress != address(0), "INVALID_TOKEN_ADDRESS");
        require(TokensPerDollar[tokenAddress] > 0, "PRICE_NOT_SET");

        return (amountInDollars * tokensPerDollar(tokenAddress)) / DOLLAR_PRECISION;
    }

    function setPriceOracle(address _priceOracle) external onlyOwner {
        require(_priceOracle != address(0), "must be valid address");
        PRICE_ORACLE = _priceOracle;
        emit UpdatePriceOracle(_priceOracle);
    }
}

File 2 of 4 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)

pragma solidity ^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() {
        _transferOwnership(_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 {
        _transferOwnership(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");
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 3 of 4 : ILoadPriceHandler.sol
// SPDX-License-Identifier: MIT
// DragonCryptoGaming - Legend of Aurum Draconis Contract Libaries

pragma solidity ^0.8.14;

/**
 * @dev Interfact 
 */
interface ILoadPriceHandler {
    function tokenCostDCARBond(
        address tokenAddress,
        uint256 discount
    ) external view
    returns (uint256);

    function totalCostHeal( uint256 amount ) external view returns (uint256);

    function costToResurrect( uint256 level ) external view returns (uint256);

    function bardSongCost( ) external view returns (uint256);

    function innRestCost( uint256 level ) external view returns (uint256);
}

File 4 of 4 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

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;
    }
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 500
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract ABI

[{"inputs":[{"internalType":"address","name":"priceOracle","type":"address"},{"internalType":"address","name":"dcauContract","type":"address"},{"internalType":"address","name":"dcarContract","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":true,"internalType":"uint256","name":"newPrice","type":"uint256"}],"name":"BardSongDollarsUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":true,"internalType":"uint256","name":"newPrice","type":"uint256"}],"name":"DCARBondPriceUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":true,"internalType":"uint256","name":"newPrice","type":"uint256"}],"name":"HealingDollarsPerHPUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":true,"internalType":"uint256","name":"newPrice","type":"uint256"}],"name":"InnRestDollarsUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":true,"internalType":"uint256","name":"newPrice","type":"uint256"}],"name":"InnRestLevelMultiplierDollarsUpdated","type":"event"},{"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":true,"internalType":"address","name":"sender","type":"address"},{"indexed":true,"internalType":"uint256","name":"newPrice","type":"uint256"}],"name":"ResurrectionDollarsUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":true,"internalType":"uint256","name":"newPrice","type":"uint256"}],"name":"TokenDollarsRewardPerLevelUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"newPrice","type":"uint256"}],"name":"TokenPriceUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"newPriceOracle","type":"address"}],"name":"UpdatePriceOracle","type":"event"},{"inputs":[],"name":"BARD_SONG_DOLLARS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DCAR_BOND_PRICE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DCAR_CONTRACT_ADDRESS","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DCAU_CONTRACT_ADDRESS","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DOLLAR_PRECISION","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"HEALING_DOLLARS_PER_HP","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"INN_REST_DOLLARS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"INN_REST_LEVEL_MULTIPLIER_DOLLARS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PRICE_ORACLE","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"RESURRECTION_DOLLARS_PER_LEVEL","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TOKEN_DOLLARS_REWARD_PER_LEVEL","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"TokensPerDollar","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"bardSongCost","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"amountInDollars","type":"uint256"}],"name":"costFromStableCost","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"level","type":"uint256"}],"name":"costToResurrect","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"level","type":"uint256"}],"name":"innRestCost","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":"uint256","name":"amount","type":"uint256"}],"name":"setBardSongPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"priceInDollars","type":"uint256"}],"name":"setDCARBondPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"setHealingPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"setInnRestLevelMultiplierDollars","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"setInnRestPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_priceOracle","type":"address"}],"name":"setPriceOracle","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"setResurrectionPricePerLevel","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"setRewardPerLevelPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"amountPerDollar","type":"uint256"}],"name":"setTokenPricePerDollar","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"discount","type":"uint256"}],"name":"tokenCostDCARBond","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"tokenAddress","type":"address"}],"name":"tokensPerDollar","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"totalCostHeal","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60c060405260196002556109c460035562000024670de0b6b3a76400006001620001f1565b6004556200003c670de0b6b3a76400006003620001f1565b600555601960065560146007556200005e670de0b6b3a76400006064620001f1565b6008553480156200006e57600080fd5b50604051620013a0380380620013a083398101604081905262000091916200023c565b6200009c33620001a1565b6001600160a01b038316620000e75760405162461bcd60e51b815260206004820152601560248201526000805160206200138083398151915260448201526064015b60405180910390fd5b6001600160a01b0382166200012e5760405162461bcd60e51b81526020600482015260156024820152600080516020620013808339815191526044820152606401620000de565b6001600160a01b038116620001755760405162461bcd60e51b81526020600482015260156024820152600080516020620013808339815191526044820152606401620000de565b600180546001600160a01b0319166001600160a01b0394851617905590821660a0521660805262000286565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60008160001904831182151516156200021a57634e487b7160e01b600052601160045260246000fd5b500290565b80516001600160a01b03811681146200023757600080fd5b919050565b6000806000606084860312156200025257600080fd5b6200025d846200021f565b92506200026d602085016200021f565b91506200027d604085016200021f565b90509250925092565b60805160a0516110bf620002c1600039600081816102b90152818161051b01528181610d060152610d550152600061041501526110bf6000f3fe608060405234801561001057600080fd5b50600436106101e55760003560e01c8063718a6b221161010f578063ae3074d4116100a2578063e8d5e0b611610071578063e8d5e0b6146103e1578063e8df4f45146103ea578063f2fde38b146103fd578063fd94db2a1461041057600080fd5b8063ae3074d4146103b4578063ba14329d146103bd578063bdf38389146103d0578063d97a6336146103d957600080fd5b80638da5cb5b116100de5780638da5cb5b14610367578063a1f12cfa14610378578063a332863314610381578063a4851d321461039457600080fd5b8063718a6b221461031b57806381c0a4f51461032e57806382351a2d14610341578063894994c31461035457600080fd5b80633865b57711610187578063484786f311610156578063484786f3146102e45780634975bf4c146102ed578063530e784f14610300578063715018a61461031357600080fd5b80633865b5771461028e5780634013fdd9146102a157806342097f6b146102b4578063424e05fb146102db57600080fd5b80631030c1f7116101c35780631030c1f71461025057806311e9bb2914610263578063131d307214610276578063284fb7ca1461027f57600080fd5b80630280078e146101ea5780630529aaf7146101ff5780630a19399a14610225575b600080fd5b6101fd6101f8366004610f69565b610437565b005b61021261020d366004610f69565b6104fa565b6040519081526020015b60405180910390f35b600154610238906001600160a01b031681565b6040516001600160a01b03909116815260200161021c565b6101fd61025e366004610f69565b610568565b610212610271366004610f9e565b610626565b61021260045481565b610212670de0b6b3a764000081565b6101fd61029c366004610f69565b610672565b6102126102af366004610f9e565b610730565b6102387f000000000000000000000000000000000000000000000000000000000000000081565b61021260075481565b61021260065481565b6101fd6102fb366004610f69565b6107f1565b6101fd61030e366004610fc8565b61086e565b6101fd610963565b6101fd610329366004610f69565b6109b7565b61021261033c366004610fc8565b610a75565b6101fd61034f366004610f9e565b610b36565b6101fd610362366004610f69565b610c27565b6000546001600160a01b0316610238565b61021260085481565b61021261038f366004610f69565b610ce5565b6102126103a2366004610fc8565b60096020526000908152604090205481565b61021260025481565b6102126103cb366004610f69565b610d34565b61021260035481565b610212610d45565b61021260055481565b6101fd6103f8366004610f69565b610d95565b6101fd61040b366004610fc8565b610e53565b6102387f000000000000000000000000000000000000000000000000000000000000000081565b6000546001600160a01b031633146104845760405162461bcd60e51b8152602060048201819052602482015260008051602061106a83398151915260448201526064015b60405180910390fd5b600081116104c55760405162461bcd60e51b815260206004820152600e60248201526d43414e4e4f545f42455f5a45524f60901b604482015260640161047b565b6003819055604051819033907ff9dae1f0af95a630d58cca93cbebb10198619d326150f74f4f2afe935da5d15590600090a350565b6000808260065461050b9190610ff9565b9050670de0b6b3a764000061053f7f0000000000000000000000000000000000000000000000000000000000000000610a75565b8260055461054d9190611018565b6105579190610ff9565b6105619190611030565b9392505050565b6000546001600160a01b031633146105b05760405162461bcd60e51b8152602060048201819052602482015260008051602061106a833981519152604482015260640161047b565b600081116105f15760405162461bcd60e51b815260206004820152600e60248201526d43414e4e4f545f42455f5a45524f60901b604482015260640161047b565b6005819055604051819033907f8eb548f79180eb0cacaf93f88bd3b95f470bd0fb90ab43f2d0ff3e1e6a8eebd290600090a350565b60008060085461063585610a75565b61063f9190610ff9565b905060006103e86106508584610ff9565b61065a9190611030565b905060006106688284611052565b9695505050505050565b6000546001600160a01b031633146106ba5760405162461bcd60e51b8152602060048201819052602482015260008051602061106a833981519152604482015260640161047b565b600081116106fb5760405162461bcd60e51b815260206004820152600e60248201526d43414e4e4f545f42455f5a45524f60901b604482015260640161047b565b6006819055604051819033907f12a0556faa414fa2c89ff04ac9ad07d8956571c7d8bba2553fa983cd4ff0bc2390600090a350565b60006001600160a01b0383166107805760405162461bcd60e51b8152602060048201526015602482015274494e56414c49445f544f4b454e5f4144445245535360581b604482015260640161047b565b6001600160a01b0383166000908152600960205260409020546107d55760405162461bcd60e51b815260206004820152600d60248201526c14149250d157d393d517d4d155609a1b604482015260640161047b565b670de0b6b3a76400006107e784610a75565b6105579084610ff9565b6001546001600160a01b031633146108395760405162461bcd60e51b815260206004820152600b60248201526a4f5241434c455f4f4e4c5960a81b604482015260640161047b565b6008819055604051819033907f5200b6dab32674c61657271eeec88a5f01339c0d4d3259323399078164e2caa990600090a350565b6000546001600160a01b031633146108b65760405162461bcd60e51b8152602060048201819052602482015260008051602061106a833981519152604482015260640161047b565b6001600160a01b03811661090c5760405162461bcd60e51b815260206004820152601560248201527f6d7573742062652076616c696420616464726573730000000000000000000000604482015260640161047b565b6001805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0383169081179091556040517f87d3dc004826fc71bc569232df26f4f063b08fae6485f0b5842a1b74839833c590600090a250565b6000546001600160a01b031633146109ab5760405162461bcd60e51b8152602060048201819052602482015260008051602061106a833981519152604482015260640161047b565b6109b56000610f0c565b565b6000546001600160a01b031633146109ff5760405162461bcd60e51b8152602060048201819052602482015260008051602061106a833981519152604482015260640161047b565b60008111610a405760405162461bcd60e51b815260206004820152600e60248201526d43414e4e4f545f42455f5a45524f60901b604482015260640161047b565b6004819055604051819033907f2a331ed24691121d5b62f21f09884e777c3f041740f2e446eaf7d45fa6ddc3b790600090a350565b60006001600160a01b038216610ac55760405162461bcd60e51b8152602060048201526015602482015274494e56414c49445f544f4b454e5f4144445245535360581b604482015260640161047b565b6001600160a01b038216600090815260096020526040902054610b1a5760405162461bcd60e51b815260206004820152600d60248201526c14149250d157d393d517d4d155609a1b604482015260640161047b565b506001600160a01b031660009081526009602052604090205490565b6001600160a01b038216610b845760405162461bcd60e51b8152602060048201526015602482015274494e56414c49445f544f4b454e5f4144445245535360581b604482015260640161047b565b6001546001600160a01b03163314610bcc5760405162461bcd60e51b815260206004820152600b60248201526a4f5241434c455f4f4e4c5960a81b604482015260640161047b565b6001600160a01b038216600081815260096020526040908190208390555133907fba0e660e9025582ae3e96d032ee693a67b9f46ce993e90c05ded3461e3c4e08a90610c1b9085815260200190565b60405180910390a35050565b6000546001600160a01b03163314610c6f5760405162461bcd60e51b8152602060048201819052602482015260008051602061106a833981519152604482015260640161047b565b60008111610cb05760405162461bcd60e51b815260206004820152600e60248201526d43414e4e4f545f42455f5a45524f60901b604482015260640161047b565b6002819055604051819033907f7b6d5220ccba3c44e3b5a6a9ad20b487ac1a01f73f53c8610f57f18304ca09dc90600090a350565b60008082600254610cf69190610ff9565b9050670de0b6b3a7640000610d2a7f0000000000000000000000000000000000000000000000000000000000000000610a75565b6105579083610ff9565b60008082600354610cf69190610ff9565b6000670de0b6b3a7640000610d797f0000000000000000000000000000000000000000000000000000000000000000610a75565b600454610d869190610ff9565b610d909190611030565b905090565b6000546001600160a01b03163314610ddd5760405162461bcd60e51b8152602060048201819052602482015260008051602061106a833981519152604482015260640161047b565b60008111610e1e5760405162461bcd60e51b815260206004820152600e60248201526d43414e4e4f545f42455f5a45524f60901b604482015260640161047b565b6007819055604051819033907fb9c6b0ae5b1b2c64c170f299711f69f5e259efe9be243661bb7c1d8f878720b390600090a350565b6000546001600160a01b03163314610e9b5760405162461bcd60e51b8152602060048201819052602482015260008051602061106a833981519152604482015260640161047b565b6001600160a01b038116610f005760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161047b565b610f0981610f0c565b50565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600060208284031215610f7b57600080fd5b5035919050565b80356001600160a01b0381168114610f9957600080fd5b919050565b60008060408385031215610fb157600080fd5b610fba83610f82565b946020939093013593505050565b600060208284031215610fda57600080fd5b61056182610f82565b634e487b7160e01b600052601160045260246000fd5b600081600019048311821515161561101357611013610fe3565b500290565b6000821982111561102b5761102b610fe3565b500190565b60008261104d57634e487b7160e01b600052601260045260246000fd5b500490565b60008282101561106457611064610fe3565b50039056fe4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a2646970667358221220a75a358ca47780480de5dab0361f77f1168b0b97c05dbd8f5e33af2b49f7050864736f6c634300080e00336d7573742062652076616c6964206164647265737300000000000000000000000000000000000000000000008ae449127eed88859a4d1d68e32bbfb2b78c71fb00000000000000000000000060945ebb8bf941523428d661297398a7c6c6a6fd0000000000000000000000009a6f1122b617f4e50fc5b1dcbb8398589f3417a3

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

0000000000000000000000008ae449127eed88859a4d1d68e32bbfb2b78c71fb00000000000000000000000060945ebb8bf941523428d661297398a7c6c6a6fd0000000000000000000000009a6f1122b617f4e50fc5b1dcbb8398589f3417a3

-----Decoded View---------------
Arg [0] : priceOracle (address): 0x8ae449127eed88859a4d1d68e32bbfb2b78c71fb
Arg [1] : dcauContract (address): 0x60945ebb8bf941523428d661297398a7c6c6a6fd
Arg [2] : dcarContract (address): 0x9a6f1122b617f4e50fc5b1dcbb8398589f3417a3

-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 0000000000000000000000008ae449127eed88859a4d1d68e32bbfb2b78c71fb
Arg [1] : 00000000000000000000000060945ebb8bf941523428d661297398a7c6c6a6fd
Arg [2] : 0000000000000000000000009a6f1122b617f4e50fc5b1dcbb8398589f3417a3


Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading