Contract 0xffc533a16bd7f3b1f879f86e4281bbe995e8ae37

Contract Overview

Balance:
0 AVAX
Txn Hash Method
Block
From
To
Value [Txn Fee]
0xd718ea272c842145c56176986f92eb8682cec24e8b3302c7d35c89f81876c740Rest185429782023-02-01 16:09:543 hrs 5 mins ago0x96e854140ac8e074275d36b392f9f73f647d4844 IN 0xffc533a16bd7f3b1f879f86e4281bbe995e8ae370 AVAX0.004505162697 29.7045
0x936eda63f54fd7c785d49a6b831b82e7453c01f242188aa6e82ee543967f801cRest185419812023-02-01 15:36:253 hrs 38 mins ago0x96e854140ac8e074275d36b392f9f73f647d4844 IN 0xffc533a16bd7f3b1f879f86e4281bbe995e8ae370 AVAX0.0045268719 29.85
0x3ba1271a0e5e0f5b46f90e71d0847db7009d555890ae6e93031e169517ad0ccfRest185400612023-02-01 14:32:004 hrs 43 mins ago0x37f8ff5b4e5ea9369c78e4f93a0043d7d519745c IN 0xffc533a16bd7f3b1f879f86e4281bbe995e8ae370 AVAX0.0045272301 29.85
0xde49a88f7aac7fd549fbb52d19ba858106aa9361f7b2bb6f666802a85019e02bRest185398862023-02-01 14:26:104 hrs 48 mins ago0x37f8ff5b4e5ea9369c78e4f93a0043d7d519745c IN 0xffc533a16bd7f3b1f879f86e4281bbe995e8ae370 AVAX0.0045272301 29.85
0xba162e61dc7b2cee64afe01e3284de5790c1c05b9e55dbfa308ffe245acd8bc0Rest185396932023-02-01 14:19:434 hrs 55 mins ago0x96e854140ac8e074275d36b392f9f73f647d4844 IN 0xffc533a16bd7f3b1f879f86e4281bbe995e8ae370 AVAX0.0045266331 29.85
0x4495867ff34115f906ea0b759fb8888dd6f315ed300516a69805fede67a2a617Rest185393432023-02-01 14:08:045 hrs 6 mins ago0x96e854140ac8e074275d36b392f9f73f647d4844 IN 0xffc533a16bd7f3b1f879f86e4281bbe995e8ae370 AVAX0.0045266331 29.85
0xec275ca95ae588124cf1b2b507ba111feee12e892101280b3b9a1ae2bf215fa3Rest185393292023-02-01 14:07:365 hrs 7 mins ago0x96e854140ac8e074275d36b392f9f73f647d4844 IN 0xffc533a16bd7f3b1f879f86e4281bbe995e8ae370 AVAX0.004505162697 29.7045
0x4fe0ab880ab4da79422e87ab079dd75845406d9ee95f3b321e0cc0ea0612e317Rest185393172023-02-01 14:07:125 hrs 7 mins ago0x37f8ff5b4e5ea9369c78e4f93a0043d7d519745c IN 0xffc533a16bd7f3b1f879f86e4281bbe995e8ae370 AVAX0.004505162697 29.7045
0xde891474bf389a9388b582886003fe967936169b300945c6cbd8a58e2615cf51Rest185379102023-02-01 13:20:155 hrs 54 mins ago0x37f8ff5b4e5ea9369c78e4f93a0043d7d519745c IN 0xffc533a16bd7f3b1f879f86e4281bbe995e8ae370 AVAX0.0045272301 29.85
0xf5099c922eea7d7af2b29b4025b379cd5177fac312b77299aa68178885d37b29Rest185372242023-02-01 12:57:236 hrs 17 mins ago0x37f8ff5b4e5ea9369c78e4f93a0043d7d519745c IN 0xffc533a16bd7f3b1f879f86e4281bbe995e8ae370 AVAX0.004505162697 29.7045
0x680cedb6d89dea025ca60bc52cbb79f3e742946cb9c76e9c8cda5aa80c64c691Rest185367432023-02-01 12:41:206 hrs 33 mins ago0x37f8ff5b4e5ea9369c78e4f93a0043d7d519745c IN 0xffc533a16bd7f3b1f879f86e4281bbe995e8ae370 AVAX0.004483402555 29.563365
0x610bd003d2ae1cfe78def0cbfa5c0a0a33b94938c9ad0cebb2f72956c65e5dd9Rest185360412023-02-01 12:17:546 hrs 57 mins ago0x37f8ff5b4e5ea9369c78e4f93a0043d7d519745c IN 0xffc533a16bd7f3b1f879f86e4281bbe995e8ae370 AVAX0.0045266331 29.85
0x50c1b1eda62689fa4488add4784880dee140129aa38188fa1e9bfd17b6d4c38dRest185353422023-02-01 11:54:367 hrs 20 mins ago0x37f8ff5b4e5ea9369c78e4f93a0043d7d519745c IN 0xffc533a16bd7f3b1f879f86e4281bbe995e8ae370 AVAX0.0045266331 29.85
0x3767cf9866e220673fd8fc4432870e0b1257c2d97be638b3c31970e0c7dbf747Rest185348822023-02-01 11:39:147 hrs 35 mins ago0x37f8ff5b4e5ea9369c78e4f93a0043d7d519745c IN 0xffc533a16bd7f3b1f879f86e4281bbe995e8ae370 AVAX0.0045266331 29.85
0x827106ccc0eb24d3b58d077171d7f00b85767d30b56719ecdfe591ef96f2101dRest185195262023-02-01 2:31:1616 hrs 43 mins ago0xe6232d40e76212aafbcb4ab1759b1b04340c8d61 IN 0xffc533a16bd7f3b1f879f86e4281bbe995e8ae370 AVAX0.004504568607 29.7045
0xcb77833e285c1dfa4edb6668b1c50abffe8c692c24d92b28c4a8023a8bf88b9fRest185191112023-02-01 2:10:4017 hrs 4 mins ago0xe6232d40e76212aafbcb4ab1759b1b04340c8d61 IN 0xffc533a16bd7f3b1f879f86e4281bbe995e8ae370 AVAX0.004018619 26.5
0xd72ff859bef078b4f8103837bcd4c0d1e84cb3b76b5d35c571c259af4d1e9f3eRest185159252023-01-31 23:29:1319 hrs 45 mins ago0xe6232d40e76212aafbcb4ab1759b1b04340c8d61 IN 0xffc533a16bd7f3b1f879f86e4281bbe995e8ae370 AVAX0.004018301 26.5
0x65e3da9eb820bce0690506b3056180ac3ada607d04a06874d1e1225f02a61e85Rest185125052023-01-31 20:46:2622 hrs 28 mins ago0x155eab945f0ebd9ecc6fd1721a3c759b58b391e7 IN 0xffc533a16bd7f3b1f879f86e4281bbe995e8ae370 AVAX0.00379165 25
0xfb84e315b51684835c65fadd80419d077de1eaed47598df778fb8992e23bb44dRest185092762023-01-31 17:57:121 day 1 hr ago0x2c599a6461e211be4dd28d3c291de85a2c127ebe IN 0xffc533a16bd7f3b1f879f86e4281bbe995e8ae370 AVAX0.0045268719 29.85
0x3d09fa5f2c54b79ac3cd330dcc742f4ba47f0723c2f89960c0a98e7c88bc8665Rest185075532023-01-31 16:33:401 day 2 hrs ago0x2c599a6461e211be4dd28d3c291de85a2c127ebe IN 0xffc533a16bd7f3b1f879f86e4281bbe995e8ae370 AVAX0.004148406348 27.35225
0x1bbaf593a9643919ef54d263755e258faca2cef56e16e685692fa544ea5cdf88Rest185066042023-01-31 15:52:231 day 3 hrs ago0x2c599a6461e211be4dd28d3c291de85a2c127ebe IN 0xffc533a16bd7f3b1f879f86e4281bbe995e8ae370 AVAX0.004018831 26.5
0x0a1678802f627774e82c656c82cd4cf73034e3ae0941557974285b3656454a6bRest185061212023-01-31 15:33:321 day 3 hrs ago0x155eab945f0ebd9ecc6fd1721a3c759b58b391e7 IN 0xffc533a16bd7f3b1f879f86e4281bbe995e8ae370 AVAX0.00379105 25
0x9e63d8533db452131e4ef67e4e44a547432b59009ad2e2150c4ee39bd3c5a554Rest185061052023-01-31 15:32:561 day 3 hrs ago0x155eab945f0ebd9ecc6fd1721a3c759b58b391e7 IN 0xffc533a16bd7f3b1f879f86e4281bbe995e8ae370 AVAX0.00379135 25
0x5ff7dca395e319e621c1261ec45627509c331947d63ee30d0ea9cee16381fed8Rest185060172023-01-31 15:29:531 day 3 hrs ago0x155eab945f0ebd9ecc6fd1721a3c759b58b391e7 IN 0xffc533a16bd7f3b1f879f86e4281bbe995e8ae370 AVAX0.00379135 25
0xaca83c461e847b55e0cc30b00c9fc27624e4ace261f0a88c04f8ffb7974232c1Rest185059972023-01-31 15:29:071 day 3 hrs ago0x155eab945f0ebd9ecc6fd1721a3c759b58b391e7 IN 0xffc533a16bd7f3b1f879f86e4281bbe995e8ae370 AVAX0.00379135 25
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0xd718ea272c842145c56176986f92eb8682cec24e8b3302c7d35c89f81876c740185429782023-02-01 16:09:543 hrs 5 mins ago 0xffc533a16bd7f3b1f879f86e4281bbe995e8ae370x44a1d562babd29bd9e258c35c6941bfbe9631dd20 AVAX
0xd718ea272c842145c56176986f92eb8682cec24e8b3302c7d35c89f81876c740185429782023-02-01 16:09:543 hrs 5 mins ago 0xffc533a16bd7f3b1f879f86e4281bbe995e8ae370x60945ebb8bf941523428d661297398a7c6c6a6fd0 AVAX
0xd718ea272c842145c56176986f92eb8682cec24e8b3302c7d35c89f81876c740185429782023-02-01 16:09:543 hrs 5 mins ago 0xffc533a16bd7f3b1f879f86e4281bbe995e8ae370x082917694cec266c55637466d923b36b821c46e60 AVAX
0xd718ea272c842145c56176986f92eb8682cec24e8b3302c7d35c89f81876c740185429782023-02-01 16:09:543 hrs 5 mins ago 0xffc533a16bd7f3b1f879f86e4281bbe995e8ae370x00000000000000000000000000000000000000010 AVAX
0x936eda63f54fd7c785d49a6b831b82e7453c01f242188aa6e82ee543967f801c185419812023-02-01 15:36:253 hrs 38 mins ago 0xffc533a16bd7f3b1f879f86e4281bbe995e8ae370x44a1d562babd29bd9e258c35c6941bfbe9631dd20 AVAX
0x936eda63f54fd7c785d49a6b831b82e7453c01f242188aa6e82ee543967f801c185419812023-02-01 15:36:253 hrs 38 mins ago 0xffc533a16bd7f3b1f879f86e4281bbe995e8ae370x60945ebb8bf941523428d661297398a7c6c6a6fd0 AVAX
0x936eda63f54fd7c785d49a6b831b82e7453c01f242188aa6e82ee543967f801c185419812023-02-01 15:36:253 hrs 38 mins ago 0xffc533a16bd7f3b1f879f86e4281bbe995e8ae370x082917694cec266c55637466d923b36b821c46e60 AVAX
0x936eda63f54fd7c785d49a6b831b82e7453c01f242188aa6e82ee543967f801c185419812023-02-01 15:36:253 hrs 38 mins ago 0xffc533a16bd7f3b1f879f86e4281bbe995e8ae370x00000000000000000000000000000000000000010 AVAX
0x3ba1271a0e5e0f5b46f90e71d0847db7009d555890ae6e93031e169517ad0ccf185400612023-02-01 14:32:004 hrs 43 mins ago 0xffc533a16bd7f3b1f879f86e4281bbe995e8ae370x44a1d562babd29bd9e258c35c6941bfbe9631dd20 AVAX
0x3ba1271a0e5e0f5b46f90e71d0847db7009d555890ae6e93031e169517ad0ccf185400612023-02-01 14:32:004 hrs 43 mins ago 0xffc533a16bd7f3b1f879f86e4281bbe995e8ae370x60945ebb8bf941523428d661297398a7c6c6a6fd0 AVAX
0x3ba1271a0e5e0f5b46f90e71d0847db7009d555890ae6e93031e169517ad0ccf185400612023-02-01 14:32:004 hrs 43 mins ago 0xffc533a16bd7f3b1f879f86e4281bbe995e8ae370x082917694cec266c55637466d923b36b821c46e60 AVAX
0x3ba1271a0e5e0f5b46f90e71d0847db7009d555890ae6e93031e169517ad0ccf185400612023-02-01 14:32:004 hrs 43 mins ago 0xffc533a16bd7f3b1f879f86e4281bbe995e8ae370x00000000000000000000000000000000000000010 AVAX
0xde49a88f7aac7fd549fbb52d19ba858106aa9361f7b2bb6f666802a85019e02b185398862023-02-01 14:26:104 hrs 48 mins ago 0xffc533a16bd7f3b1f879f86e4281bbe995e8ae370x44a1d562babd29bd9e258c35c6941bfbe9631dd20 AVAX
0xde49a88f7aac7fd549fbb52d19ba858106aa9361f7b2bb6f666802a85019e02b185398862023-02-01 14:26:104 hrs 48 mins ago 0xffc533a16bd7f3b1f879f86e4281bbe995e8ae370x60945ebb8bf941523428d661297398a7c6c6a6fd0 AVAX
0xde49a88f7aac7fd549fbb52d19ba858106aa9361f7b2bb6f666802a85019e02b185398862023-02-01 14:26:104 hrs 48 mins ago 0xffc533a16bd7f3b1f879f86e4281bbe995e8ae370x082917694cec266c55637466d923b36b821c46e60 AVAX
0xde49a88f7aac7fd549fbb52d19ba858106aa9361f7b2bb6f666802a85019e02b185398862023-02-01 14:26:104 hrs 48 mins ago 0xffc533a16bd7f3b1f879f86e4281bbe995e8ae370x00000000000000000000000000000000000000010 AVAX
0xba162e61dc7b2cee64afe01e3284de5790c1c05b9e55dbfa308ffe245acd8bc0185396932023-02-01 14:19:434 hrs 55 mins ago 0xffc533a16bd7f3b1f879f86e4281bbe995e8ae370x44a1d562babd29bd9e258c35c6941bfbe9631dd20 AVAX
0xba162e61dc7b2cee64afe01e3284de5790c1c05b9e55dbfa308ffe245acd8bc0185396932023-02-01 14:19:434 hrs 55 mins ago 0xffc533a16bd7f3b1f879f86e4281bbe995e8ae370x60945ebb8bf941523428d661297398a7c6c6a6fd0 AVAX
0xba162e61dc7b2cee64afe01e3284de5790c1c05b9e55dbfa308ffe245acd8bc0185396932023-02-01 14:19:434 hrs 55 mins ago 0xffc533a16bd7f3b1f879f86e4281bbe995e8ae370x082917694cec266c55637466d923b36b821c46e60 AVAX
0xba162e61dc7b2cee64afe01e3284de5790c1c05b9e55dbfa308ffe245acd8bc0185396932023-02-01 14:19:434 hrs 55 mins ago 0xffc533a16bd7f3b1f879f86e4281bbe995e8ae370x00000000000000000000000000000000000000010 AVAX
0x4495867ff34115f906ea0b759fb8888dd6f315ed300516a69805fede67a2a617185393432023-02-01 14:08:045 hrs 6 mins ago 0xffc533a16bd7f3b1f879f86e4281bbe995e8ae370x44a1d562babd29bd9e258c35c6941bfbe9631dd20 AVAX
0x4495867ff34115f906ea0b759fb8888dd6f315ed300516a69805fede67a2a617185393432023-02-01 14:08:045 hrs 6 mins ago 0xffc533a16bd7f3b1f879f86e4281bbe995e8ae370x60945ebb8bf941523428d661297398a7c6c6a6fd0 AVAX
0x4495867ff34115f906ea0b759fb8888dd6f315ed300516a69805fede67a2a617185393432023-02-01 14:08:045 hrs 6 mins ago 0xffc533a16bd7f3b1f879f86e4281bbe995e8ae370x082917694cec266c55637466d923b36b821c46e60 AVAX
0x4495867ff34115f906ea0b759fb8888dd6f315ed300516a69805fede67a2a617185393432023-02-01 14:08:045 hrs 6 mins ago 0xffc533a16bd7f3b1f879f86e4281bbe995e8ae370x00000000000000000000000000000000000000010 AVAX
0xec275ca95ae588124cf1b2b507ba111feee12e892101280b3b9a1ae2bf215fa3185393292023-02-01 14:07:365 hrs 7 mins ago 0xffc533a16bd7f3b1f879f86e4281bbe995e8ae370x44a1d562babd29bd9e258c35c6941bfbe9631dd20 AVAX
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
LoadInn

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 12 : LoadInn.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.14;

import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/utils/cryptography/draft-EIP712.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "../libraries/IRewardReceiver.sol";
import "../libraries/ILoadPriceHandler.sol";

contract LoadInn is ReentrancyGuard, Ownable, EIP712 {
    using ECDSA for bytes32;
    using SafeERC20 for IERC20;

    event BardSong(address indexed buyer, uint256 indexed tokenId, string indexed songId);
    event Rest(address indexed buyer, uint256 level, uint256 indexed tokenId, string indexed restId);
    event UpdateSigner(address indexed newSigner);

    address public signerAddress;

    address public immutable PRICE_HANDLER_CONTRACT;
    address public immutable REWARD_RECEIVER_CONTRACT;
    address public immutable DCAU_TOKEN_CONTRACT;

    mapping(string => bool) public _usedNonces;

    constructor(
        address _priceHandler,
        address _rewardReceiver,
        address _dcauToken,
        address _signer
    ) EIP712("Load Inn", "1.01") {
        require(_priceHandler != address(0), "INVALID_PRICING_ADDRESS");
        require(_rewardReceiver != address(0), "INVALID_REWARD_ADDRESS");
        require(_dcauToken != address(0), "INVALID_DCAU_TOKEN_ADDRESS");
        require(_signer != address(0), "INVALID_SIGNER_ADDRESS");

        PRICE_HANDLER_CONTRACT = _priceHandler;
        REWARD_RECEIVER_CONTRACT = _rewardReceiver;
        DCAU_TOKEN_CONTRACT = _dcauToken;
        signerAddress = _signer;
    }

    function bardSong(
        uint256 tokenId,
        string calldata songId,
        bytes calldata signature,
        string calldata nonce
    ) external nonReentrant {
        require(matchAddresSigner(hashTransactionSong(msg.sender, tokenId, songId, nonce), signature), "DIRECT_SONG_DISALLOWED");
        require(tokenId > 0, "Token ID greater than 0");
        require(!_usedNonces[nonce], "HASH_USED");

        _usedNonces[nonce] = true;

        ILoadPriceHandler priceHandler = ILoadPriceHandler(PRICE_HANDLER_CONTRACT);

        uint256 costForSong = priceHandler.bardSongCost();

        IERC20 dcauContract = IERC20(DCAU_TOKEN_CONTRACT);

        IRewardReceiver rewardReceiver = IRewardReceiver(REWARD_RECEIVER_CONTRACT);

        dcauContract.safeTransferFrom(msg.sender, REWARD_RECEIVER_CONTRACT, costForSong);
        rewardReceiver.receiveTokens(DCAU_TOKEN_CONTRACT, costForSong);

        emit BardSong(msg.sender, tokenId, songId);
    }

    function rest(
        uint256 level,
        uint256 tokenId,
        string calldata restId,
        bytes calldata signature,
        string calldata nonce
    ) external nonReentrant {
        require(
            matchAddresSigner(hashTransactionRest(msg.sender, level, tokenId, restId, nonce), signature),
            "DIRECT_REST_DISALLOWED"
        );
        require(tokenId > 0, "Token ID greater than 0");
        require(!_usedNonces[nonce], "HASH_USED");

        _usedNonces[nonce] = true;

        ILoadPriceHandler priceHandler = ILoadPriceHandler(PRICE_HANDLER_CONTRACT);

        uint256 costToRes = priceHandler.innRestCost(level);

        IERC20 dcauContract = IERC20(DCAU_TOKEN_CONTRACT);

        IRewardReceiver rewardReceiver = IRewardReceiver(REWARD_RECEIVER_CONTRACT);

        dcauContract.safeTransferFrom(msg.sender, REWARD_RECEIVER_CONTRACT, costToRes);
        rewardReceiver.receiveTokens(DCAU_TOKEN_CONTRACT, costToRes);

        emit Rest(msg.sender, level, tokenId, restId);
    }

    // verify whether hash matches against tampering;
    function hashTransactionSong(
        address sender,
        uint256 tokenId,
        string calldata actionId,
        string calldata nonce
    ) private view returns (bytes32) {
        bytes32 hash = _hashTypedDataV4(
            keccak256(
                abi.encode(
                    keccak256("Song(address sender,uint256 tokenId,string actionId,string nonce)"),
                    sender,
                    tokenId,
                    keccak256(bytes(actionId)),
                    keccak256(bytes(nonce))
                )
            )
        );

        return hash;
    }

    // verify whether hash matches against tampering;
    function hashTransactionRest(
        address sender,
        uint256 level,
        uint256 tokenId,
        string calldata actionId,
        string calldata nonce
    ) private view returns (bytes32) {
        bytes32 hash = _hashTypedDataV4(
            keccak256(
                abi.encode(
                    keccak256("Rest(address sender,uint256 level,uint256 tokenId,string actionId,string nonce)"),
                    sender,
                    level,
                    tokenId,
                    keccak256(bytes(actionId)),
                    keccak256(bytes(nonce))
                )
            )
        );

        return hash;
    }

    // match serverside private key sign to set pub key
    function matchAddresSigner(bytes32 hash, bytes memory signature) private view returns (bool) {
        require(signerAddress != address(0), "must be a valid address");
        return signerAddress == hash.recover(signature);
    }

    // change public key for relaunches so signatures get invalidated
    function setSignerAddress(address addr) external onlyOwner {
        require(addr != address(0), "must be valid address");
        signerAddress = addr;
        emit UpdateSigner(addr);
    }
}

File 2 of 12 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _status = _ENTERED;

        _;

        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_ENTERED;
    }
}

File 3 of 12 : 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 4 of 12 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);

    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `from` to `to` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 amount
    ) external returns (bool);
}

File 5 of 12 : SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";
import "../../../utils/Address.sol";

/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    using Address for address;

    function safeTransfer(
        IERC20 token,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    function safeTransferFrom(
        IERC20 token,
        address from,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        require(
            (value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function safeIncreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        uint256 newAllowance = token.allowance(address(this), spender) + value;
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
            uint256 newAllowance = oldAllowance - value;
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
        }
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
        if (returndata.length > 0) {
            // Return data is optional
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

File 6 of 12 : draft-EIP712.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/cryptography/draft-EIP712.sol)

pragma solidity ^0.8.0;

import "./ECDSA.sol";

/**
 * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.
 *
 * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,
 * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding
 * they need in their contracts using a combination of `abi.encode` and `keccak256`.
 *
 * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding
 * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA
 * ({_hashTypedDataV4}).
 *
 * The implementation of the domain separator was designed to be as efficient as possible while still properly updating
 * the chain id to protect against replay attacks on an eventual fork of the chain.
 *
 * NOTE: This contract implements the version of the encoding known as "v4", as implemented by the JSON RPC method
 * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].
 *
 * _Available since v3.4._
 */
abstract contract EIP712 {
    /* solhint-disable var-name-mixedcase */
    // Cache the domain separator as an immutable value, but also store the chain id that it corresponds to, in order to
    // invalidate the cached domain separator if the chain id changes.
    bytes32 private immutable _CACHED_DOMAIN_SEPARATOR;
    uint256 private immutable _CACHED_CHAIN_ID;
    address private immutable _CACHED_THIS;

    bytes32 private immutable _HASHED_NAME;
    bytes32 private immutable _HASHED_VERSION;
    bytes32 private immutable _TYPE_HASH;

    /* solhint-enable var-name-mixedcase */

    /**
     * @dev Initializes the domain separator and parameter caches.
     *
     * The meaning of `name` and `version` is specified in
     * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:
     *
     * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.
     * - `version`: the current major version of the signing domain.
     *
     * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart
     * contract upgrade].
     */
    constructor(string memory name, string memory version) {
        bytes32 hashedName = keccak256(bytes(name));
        bytes32 hashedVersion = keccak256(bytes(version));
        bytes32 typeHash = keccak256(
            "EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"
        );
        _HASHED_NAME = hashedName;
        _HASHED_VERSION = hashedVersion;
        _CACHED_CHAIN_ID = block.chainid;
        _CACHED_DOMAIN_SEPARATOR = _buildDomainSeparator(typeHash, hashedName, hashedVersion);
        _CACHED_THIS = address(this);
        _TYPE_HASH = typeHash;
    }

    /**
     * @dev Returns the domain separator for the current chain.
     */
    function _domainSeparatorV4() internal view returns (bytes32) {
        if (address(this) == _CACHED_THIS && block.chainid == _CACHED_CHAIN_ID) {
            return _CACHED_DOMAIN_SEPARATOR;
        } else {
            return _buildDomainSeparator(_TYPE_HASH, _HASHED_NAME, _HASHED_VERSION);
        }
    }

    function _buildDomainSeparator(
        bytes32 typeHash,
        bytes32 nameHash,
        bytes32 versionHash
    ) private view returns (bytes32) {
        return keccak256(abi.encode(typeHash, nameHash, versionHash, block.chainid, address(this)));
    }

    /**
     * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this
     * function returns the hash of the fully encoded EIP712 message for this domain.
     *
     * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:
     *
     * ```solidity
     * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(
     *     keccak256("Mail(address to,string contents)"),
     *     mailTo,
     *     keccak256(bytes(mailContents))
     * )));
     * address signer = ECDSA.recover(digest, signature);
     * ```
     */
    function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {
        return ECDSA.toTypedDataHash(_domainSeparatorV4(), structHash);
    }
}

File 7 of 12 : ECDSA.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (utils/cryptography/ECDSA.sol)

pragma solidity ^0.8.0;

import "../Strings.sol";

/**
 * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.
 *
 * These functions can be used to verify that a message was signed by the holder
 * of the private keys of a given address.
 */
library ECDSA {
    enum RecoverError {
        NoError,
        InvalidSignature,
        InvalidSignatureLength,
        InvalidSignatureS,
        InvalidSignatureV
    }

    function _throwError(RecoverError error) private pure {
        if (error == RecoverError.NoError) {
            return; // no error: do nothing
        } else if (error == RecoverError.InvalidSignature) {
            revert("ECDSA: invalid signature");
        } else if (error == RecoverError.InvalidSignatureLength) {
            revert("ECDSA: invalid signature length");
        } else if (error == RecoverError.InvalidSignatureS) {
            revert("ECDSA: invalid signature 's' value");
        } else if (error == RecoverError.InvalidSignatureV) {
            revert("ECDSA: invalid signature 'v' value");
        }
    }

    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature` or error string. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {toEthSignedMessageHash} on it.
     *
     * Documentation for signature generation:
     * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]
     * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]
     *
     * _Available since v4.3._
     */
    function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {
        // Check the signature length
        // - case 65: r,s,v signature (standard)
        // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._
        if (signature.length == 65) {
            bytes32 r;
            bytes32 s;
            uint8 v;
            // ecrecover takes the signature parameters, and the only way to get them
            // currently is to use assembly.
            assembly {
                r := mload(add(signature, 0x20))
                s := mload(add(signature, 0x40))
                v := byte(0, mload(add(signature, 0x60)))
            }
            return tryRecover(hash, v, r, s);
        } else if (signature.length == 64) {
            bytes32 r;
            bytes32 vs;
            // ecrecover takes the signature parameters, and the only way to get them
            // currently is to use assembly.
            assembly {
                r := mload(add(signature, 0x20))
                vs := mload(add(signature, 0x40))
            }
            return tryRecover(hash, r, vs);
        } else {
            return (address(0), RecoverError.InvalidSignatureLength);
        }
    }

    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature`. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {toEthSignedMessageHash} on it.
     */
    function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, signature);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.
     *
     * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]
     *
     * _Available since v4.3._
     */
    function tryRecover(
        bytes32 hash,
        bytes32 r,
        bytes32 vs
    ) internal pure returns (address, RecoverError) {
        bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);
        uint8 v = uint8((uint256(vs) >> 255) + 27);
        return tryRecover(hash, v, r, s);
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.
     *
     * _Available since v4.2._
     */
    function recover(
        bytes32 hash,
        bytes32 r,
        bytes32 vs
    ) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, r, vs);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Overload of {ECDSA-tryRecover} that receives the `v`,
     * `r` and `s` signature fields separately.
     *
     * _Available since v4.3._
     */
    function tryRecover(
        bytes32 hash,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal pure returns (address, RecoverError) {
        // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature
        // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines
        // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most
        // signatures from current libraries generate a unique signature with an s-value in the lower half order.
        //
        // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value
        // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or
        // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept
        // these malleable signatures as well.
        if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {
            return (address(0), RecoverError.InvalidSignatureS);
        }
        if (v != 27 && v != 28) {
            return (address(0), RecoverError.InvalidSignatureV);
        }

        // If the signature is valid (and not malleable), return the signer address
        address signer = ecrecover(hash, v, r, s);
        if (signer == address(0)) {
            return (address(0), RecoverError.InvalidSignature);
        }

        return (signer, RecoverError.NoError);
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `v`,
     * `r` and `s` signature fields separately.
     */
    function recover(
        bytes32 hash,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, v, r, s);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Returns an Ethereum Signed Message, created from a `hash`. This
     * produces hash corresponding to the one signed with the
     * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
     * JSON-RPC method as part of EIP-191.
     *
     * See {recover}.
     */
    function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {
        // 32 is the length in bytes of hash,
        // enforced by the type signature above
        return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash));
    }

    /**
     * @dev Returns an Ethereum Signed Message, created from `s`. This
     * produces hash corresponding to the one signed with the
     * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
     * JSON-RPC method as part of EIP-191.
     *
     * See {recover}.
     */
    function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s));
    }

    /**
     * @dev Returns an Ethereum Signed Typed Data, created from a
     * `domainSeparator` and a `structHash`. This produces hash corresponding
     * to the one signed with the
     * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]
     * JSON-RPC method as part of EIP-712.
     *
     * See {recover}.
     */
    function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash));
    }
}

File 8 of 12 : IRewardReceiver.sol
// SPDX-License-Identifier: MIT
// DragonCryptoGaming - Legend of Aurum Draconis Contract Libaries

pragma solidity ^0.8.14;

/**
 * @dev Interfact 
 */
interface IRewardReceiver {
    /**
     * @dev Emitted when `value` tokens are moved from in to the receiver contract
     *
     * Note that `value` may be zero.
     */
    event TokensReceived(address indexed tokenContract, uint256 indexed value);

    /**
     * @dev Tells the receiver contract that tokens have been moved to it.
     *
     * Emits a {TokensReceived} event.
     */
    function receiveTokens(
        address tokenContract,
        uint256 amount
    ) external;
}

File 9 of 12 : 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 10 of 12 : 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;
    }
}

File 11 of 12 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain `call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCall(target, data, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        require(isContract(target), "Address: call to non-contract");

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(isContract(target), "Address: delegate call to non-contract");

        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

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

pragma solidity ^0.8.0;

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        // Inspired by OraclizeAPI's implementation - MIT licence
        // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol

        if (value == 0) {
            return "0";
        }
        uint256 temp = value;
        uint256 digits;
        while (temp != 0) {
            digits++;
            temp /= 10;
        }
        bytes memory buffer = new bytes(digits);
        while (value != 0) {
            digits -= 1;
            buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
            value /= 10;
        }
        return string(buffer);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        if (value == 0) {
            return "0x00";
        }
        uint256 temp = value;
        uint256 length = 0;
        while (temp != 0) {
            length++;
            temp >>= 8;
        }
        return toHexString(value, length);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
     */
    function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
        bytes memory buffer = new bytes(2 * length + 2);
        buffer[0] = "0";
        buffer[1] = "x";
        for (uint256 i = 2 * length + 1; i > 1; --i) {
            buffer[i] = _HEX_SYMBOLS[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        return string(buffer);
    }
}

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

Contract ABI

[{"inputs":[{"internalType":"address","name":"_priceHandler","type":"address"},{"internalType":"address","name":"_rewardReceiver","type":"address"},{"internalType":"address","name":"_dcauToken","type":"address"},{"internalType":"address","name":"_signer","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"buyer","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":true,"internalType":"string","name":"songId","type":"string"}],"name":"BardSong","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":"buyer","type":"address"},{"indexed":false,"internalType":"uint256","name":"level","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":true,"internalType":"string","name":"restId","type":"string"}],"name":"Rest","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"newSigner","type":"address"}],"name":"UpdateSigner","type":"event"},{"inputs":[],"name":"DCAU_TOKEN_CONTRACT","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PRICE_HANDLER_CONTRACT","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"REWARD_RECEIVER_CONTRACT","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"","type":"string"}],"name":"_usedNonces","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"string","name":"songId","type":"string"},{"internalType":"bytes","name":"signature","type":"bytes"},{"internalType":"string","name":"nonce","type":"string"}],"name":"bardSong","outputs":[],"stateMutability":"nonpayable","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":"level","type":"uint256"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"string","name":"restId","type":"string"},{"internalType":"bytes","name":"signature","type":"bytes"},{"internalType":"string","name":"nonce","type":"string"}],"name":"rest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"setSignerAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"signerAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]

6101a06040523480156200001257600080fd5b5060405162001d1838038062001d18833981016040819052620000359162000319565b60408051808201825260088152672637b0b21024b73760c11b60208083019190915282518084019093526004835263312e303160e01b908301526001600055906200008033620002aa565b815160209283012081519183019190912060e08290526101008190524660a0818152604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f818801819052818301969096526060810194909452608080850193909352308483018190528151808603909301835260c094850190915281519190950120905291909152610120526001600160a01b0384166200016b5760405162461bcd60e51b815260206004820152601760248201527f494e56414c49445f50524943494e475f4144445245535300000000000000000060448201526064015b60405180910390fd5b6001600160a01b038316620001c35760405162461bcd60e51b815260206004820152601660248201527f494e56414c49445f5245574152445f4144445245535300000000000000000000604482015260640162000162565b6001600160a01b0382166200021b5760405162461bcd60e51b815260206004820152601a60248201527f494e56414c49445f444341555f544f4b454e5f41444452455353000000000000604482015260640162000162565b6001600160a01b038116620002735760405162461bcd60e51b815260206004820152601660248201527f494e56414c49445f5349474e45525f4144445245535300000000000000000000604482015260640162000162565b6001600160a01b039384166101405291831661016052821661018052600280546001600160a01b0319169190921617905562000376565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b80516001600160a01b03811681146200031457600080fd5b919050565b600080600080608085870312156200033057600080fd5b6200033b85620002fc565b93506200034b60208601620002fc565b92506200035b60408601620002fc565b91506200036b60608601620002fc565b905092959194509250565b60805160a05160c05160e05161010051610120516101405161016051610180516118fa6200041e600039600081816101e601528181610577015281816105e30152818161093d01526109a901526000818161011c01528181610598015261095e01526000818160d8015281816104fb01526108b401526000610fbc0152600061100b01526000610fe601526000610f3f01526000610f6901526000610f9301526118fa6000f3fe608060405234801561001057600080fd5b50600436106100b95760003560e01c8063715018a611610081578063a6ba55c71161005b578063a6ba55c714610190578063f2fde38b146101ce578063f3d62a7f146101e157600080fd5b8063715018a6146101645780638da5cb5b1461016c578063981ec19a1461017d57600080fd5b8063046dc166146100be57806310abb339146100d3578063404229c8146101175780635b7633d01461013e57806360ee112814610151575b600080fd5b6100d16100cc36600461153f565b610208565b005b6100fa7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b6100fa7f000000000000000000000000000000000000000000000000000000000000000081565b6002546100fa906001600160a01b031681565b6100d161015f3660046115aa565b610314565b6100d16106af565b6001546001600160a01b03166100fa565b6100d161018b366004611657565b610715565b6101be61019e366004611711565b805160208183018101805160038252928201919093012091525460ff1681565b604051901515815260200161010e565b6100d16101dc36600461153f565b610a6a565b6100fa7f000000000000000000000000000000000000000000000000000000000000000081565b6001546001600160a01b031633146102675760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b6001600160a01b0381166102bd5760405162461bcd60e51b815260206004820152601560248201527f6d7573742062652076616c696420616464726573730000000000000000000000604482015260640161025e565b6002805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0383169081179091556040517fc58fcf255cfb5f40bd578a618869378f650ef76609640fa0818a31e0c6e7102a90600090a250565b6002600054036103665760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161025e565b60026000556103b961037d338a8a8a8a8888610b35565b85858080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610bf592505050565b6104055760405162461bcd60e51b815260206004820152601660248201527f4449524543545f524553545f444953414c4c4f57454400000000000000000000604482015260640161025e565b600087116104555760405162461bcd60e51b815260206004820152601760248201527f546f6b656e2049442067726561746572207468616e2030000000000000000000604482015260640161025e565b600382826040516104679291906117c2565b9081526040519081900360200190205460ff16156104b35760405162461bcd60e51b8152602060048201526009602482015268121054d217d554d15160ba1b604482015260640161025e565b6001600383836040516104c79291906117c2565b908152604051908190036020018120805492151560ff1990931692909217909155630529aaf760e01b8152600481018990527f0000000000000000000000000000000000000000000000000000000000000000906000906001600160a01b03831690630529aaf790602401602060405180830381865afa15801561054f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061057391906117d2565b90507f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000006105cc6001600160a01b038316338386610c72565b604051630357291360e41b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116600483015260248201859052821690633572913090604401600060405180830381600087803b15801561063657600080fd5b505af115801561064a573d6000803e3d6000fd5b50505050898960405161065e9291906117c2565b6040519081900381208d8252908c9033907f77b1fb0579bd846ba34fc24ce3120f94dae66f8bb72b4420a0edca92846e6e669060200160405180910390a45050600160005550505050505050505050565b6001546001600160a01b031633146107095760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161025e565b6107136000610ce7565b565b6002600054036107675760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161025e565b600260005561077d61037d338989898787610d46565b6107c95760405162461bcd60e51b815260206004820152601660248201527f4449524543545f534f4e475f444953414c4c4f57454400000000000000000000604482015260640161025e565b600087116108195760405162461bcd60e51b815260206004820152601760248201527f546f6b656e2049442067726561746572207468616e2030000000000000000000604482015260640161025e565b6003828260405161082b9291906117c2565b9081526040519081900360200190205460ff16156108775760405162461bcd60e51b8152602060048201526009602482015268121054d217d554d15160ba1b604482015260640161025e565b60016003838360405161088b9291906117c2565b908152602001604051809103902060006101000a81548160ff02191690831515021790555060007f000000000000000000000000000000000000000000000000000000000000000090506000816001600160a01b031663d97a63366040518163ffffffff1660e01b8152600401602060405180830381865afa158015610915573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061093991906117d2565b90507f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000006109926001600160a01b038316338386610c72565b604051630357291360e41b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116600483015260248201859052821690633572913090604401600060405180830381600087803b1580156109fc57600080fd5b505af1158015610a10573d6000803e3d6000fd5b505050508989604051610a249291906117c2565b604051908190038120908c9033907f7c9d43a5c136adb1866d0801935180cc23f113ae159e652f08c322e7a3bf915b90600090a450506001600055505050505050505050565b6001546001600160a01b03163314610ac45760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161025e565b6001600160a01b038116610b295760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161025e565b610b3281610ce7565b50565b600080610be87fa770ab43d58af2ead5e72b0867b675dd25cf69b11db346c6a9021e6f6ba2b74d8a8a8a8a8a604051610b6f9291906117c2565b60405180910390208989604051610b879291906117c2565b604051908190038120610bcd9695949392916020019586526001600160a01b0394909416602086015260408501929092526060840152608083015260a082015260c00190565b60405160208183030381529060405280519060200120610de3565b9998505050505050505050565b6002546000906001600160a01b0316610c505760405162461bcd60e51b815260206004820152601760248201527f6d75737420626520612076616c69642061646472657373000000000000000000604482015260640161025e565b610c5a8383610e37565b6002546001600160a01b039182169116149392505050565b604080516001600160a01b0385811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff166323b872dd60e01b179052610ce1908590610e5b565b50505050565b600180546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600080610dd77f1d208c8b3a6edbd1465aec9fe607327fbe210f2d51b7b5612965daa4c11c39bd89898989604051610d7f9291906117c2565b60405180910390208888604051610d979291906117c2565b604051908190038120610bcd95949392916020019485526001600160a01b0393909316602085015260408401919091526060830152608082015260a00190565b98975050505050505050565b6000610e31610df0610f32565b8360405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b92915050565b6000806000610e468585611059565b91509150610e53816110c7565b509392505050565b6000610eb0826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661127d9092919063ffffffff16565b805190915015610f2d5780806020019051810190610ece91906117eb565b610f2d5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161025e565b505050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148015610f8b57507f000000000000000000000000000000000000000000000000000000000000000046145b15610fb557507f000000000000000000000000000000000000000000000000000000000000000090565b50604080517f00000000000000000000000000000000000000000000000000000000000000006020808301919091527f0000000000000000000000000000000000000000000000000000000000000000828401527f000000000000000000000000000000000000000000000000000000000000000060608301524660808301523060a0808401919091528351808403909101815260c0909201909252805191012090565b600080825160410361108f5760208301516040840151606085015160001a61108387828585611296565b945094505050506110c0565b82516040036110b857602083015160408401516110ad868383611383565b9350935050506110c0565b506000905060025b9250929050565b60008160048111156110db576110db61180d565b036110e35750565b60018160048111156110f7576110f761180d565b036111445760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e61747572650000000000000000604482015260640161025e565b60028160048111156111585761115861180d565b036111a55760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e67746800604482015260640161025e565b60038160048111156111b9576111b961180d565b036112115760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b606482015260840161025e565b60048160048111156112255761122561180d565b03610b325760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b606482015260840161025e565b606061128c84846000856113d5565b90505b9392505050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156112cd575060009050600361137a565b8460ff16601b141580156112e557508460ff16601c14155b156112f6575060009050600461137a565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa15801561134a573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166113735760006001925092505061137a565b9150600090505b94509492505050565b6000807f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8316816113b960ff86901c601b611823565b90506113c787828885611296565b935093505050935093915050565b6060824710156114365760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161025e565b6001600160a01b0385163b61148d5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161025e565b600080866001600160a01b031685876040516114a99190611875565b60006040518083038185875af1925050503d80600081146114e6576040519150601f19603f3d011682016040523d82523d6000602084013e6114eb565b606091505b50915091506114fb828286611506565b979650505050505050565b6060831561151557508161128f565b8251156115255782518084602001fd5b8160405162461bcd60e51b815260040161025e9190611891565b60006020828403121561155157600080fd5b81356001600160a01b038116811461128f57600080fd5b60008083601f84011261157a57600080fd5b50813567ffffffffffffffff81111561159257600080fd5b6020830191508360208285010111156110c057600080fd5b60008060008060008060008060a0898b0312156115c657600080fd5b8835975060208901359650604089013567ffffffffffffffff808211156115ec57600080fd5b6115f88c838d01611568565b909850965060608b013591508082111561161157600080fd5b61161d8c838d01611568565b909650945060808b013591508082111561163657600080fd5b506116438b828c01611568565b999c989b5096995094979396929594505050565b60008060008060008060006080888a03121561167257600080fd5b87359650602088013567ffffffffffffffff8082111561169157600080fd5b61169d8b838c01611568565b909850965060408a01359150808211156116b657600080fd5b6116c28b838c01611568565b909650945060608a01359150808211156116db57600080fd5b506116e88a828b01611568565b989b979a50959850939692959293505050565b634e487b7160e01b600052604160045260246000fd5b60006020828403121561172357600080fd5b813567ffffffffffffffff8082111561173b57600080fd5b818401915084601f83011261174f57600080fd5b813581811115611761576117616116fb565b604051601f8201601f19908116603f01168101908382118183101715611789576117896116fb565b816040528281528760208487010111156117a257600080fd5b826020860160208301376000928101602001929092525095945050505050565b8183823760009101908152919050565b6000602082840312156117e457600080fd5b5051919050565b6000602082840312156117fd57600080fd5b8151801515811461128f57600080fd5b634e487b7160e01b600052602160045260246000fd5b6000821982111561184457634e487b7160e01b600052601160045260246000fd5b500190565b60005b8381101561186457818101518382015260200161184c565b83811115610ce15750506000910152565b60008251611887818460208701611849565b9190910192915050565b60208152600082518060208401526118b0816040850160208701611849565b601f01601f1916919091016040019291505056fea2646970667358221220831ebcd2438461691f68b090d2f158162bce781d1422c4d1b164eb362ccd002e64736f6c634300080e0033000000000000000000000000082917694cec266c55637466d923b36b821c46e600000000000000000000000044a1d562babd29bd9e258c35c6941bfbe9631dd200000000000000000000000060945ebb8bf941523428d661297398a7c6c6a6fd0000000000000000000000008ae449127eed88859a4d1d68e32bbfb2b78c71fb

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

000000000000000000000000082917694cec266c55637466d923b36b821c46e600000000000000000000000044a1d562babd29bd9e258c35c6941bfbe9631dd200000000000000000000000060945ebb8bf941523428d661297398a7c6c6a6fd0000000000000000000000008ae449127eed88859a4d1d68e32bbfb2b78c71fb

-----Decoded View---------------
Arg [0] : _priceHandler (address): 0x082917694cec266c55637466d923b36b821c46e6
Arg [1] : _rewardReceiver (address): 0x44a1d562babd29bd9e258c35c6941bfbe9631dd2
Arg [2] : _dcauToken (address): 0x60945ebb8bf941523428d661297398a7c6c6a6fd
Arg [3] : _signer (address): 0x8ae449127eed88859a4d1d68e32bbfb2b78c71fb

-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 000000000000000000000000082917694cec266c55637466d923b36b821c46e6
Arg [1] : 00000000000000000000000044a1d562babd29bd9e258c35c6941bfbe9631dd2
Arg [2] : 00000000000000000000000060945ebb8bf941523428d661297398a7c6c6a6fd
Arg [3] : 0000000000000000000000008ae449127eed88859a4d1d68e32bbfb2b78c71fb


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