contract MyDataConsumerForShib is ConsumerBase, Ownable {
    uint256 public price;
    address NFTAddress;

    event GotSomeData(bytes32 requestId, uint256 price);

     // RinkeBy 
    // address private ROUTER_ADDRESS = address(0x05AB63BeC9CfC3897a20dE62f5f812de10301FDf);

    // RinkeBy
    // address private XFUND_ADDRESS = address(0x245330351344F9301690D5D8De2A07f5F32e1149);

    // Mainnet 
    // address private constant ROUTER_ADDRESS = address(0x9ac9AE20a17779c17b069b48A8788e3455fC6121);

    // // Mainnet
    // address private constant XFUND_ADDRESS = address(0x892A6f9dF0147e5f079b0993F486F9acA3c87881);

    modifier onlyNFTOrOwner() {
        require(msg.sender == NFTAddress || msg.sender == owner(), "Price Can only be fetched by NFT contract or the Owner");
        _;
    }

    constructor(address router, address xfund) ConsumerBase(router, xfund) {
        price = 0;
    }

    // Optionally protect with a modifier to limit who can call
    function getData(address PROVIDER_ADDRESS, uint256 _fee, bytes32 _data) external onlyNFTOrOwner returns (bytes32) {

        // bytes32 _data = 0x555344542e534849422e50522e41564300000000000000000000000000000000;  //USDT.SHIB.PR.AVC
    
        // uint256 _fee = 100000000;

        // Rinkeby 
        // address PROVIDER_ADDRESS = address(0x611661f4B5D82079E924AcE2A6D113fAbd214b14);

        // Mainnet 
        // address PROVIDER_ADDRESS = address(0xFDEc0386011d085A6b4F0e37Fab5d7f2601aCB33);

        // _provider = PROVIDER_ADDRESS
        return _requestData(PROVIDER_ADDRESS, _fee, _data);
    }

    // Todo - protect with a modifier to limit who can call!
    function increaseRouterAllowance(uint256 _amount) external onlyOwner {
        require(_increaseRouterAllowance(_amount));       // 115792089237316195423570985008687907853269984665640564039457584007913129639935
    }

    // ConsumerBase ensures only the Router can call this
    function receiveData(uint256 _price, bytes32 _requestId) internal override {
        price = _price;
        // optionally emit an event to the logs
        emit GotSomeData(_requestId, _price);
    }

    function setNFTContract(address _nftAddress) external onlyOwner {
        NFTAddress = _nftAddress;        
    }
}
function increaseRouterAllowance(uint256 _amount) external onlyOwner {
    require(_increaseRouterAllowance(_amount));       // 115792089237316195423570985008687907853269984665640564039457584007913129639935
}

// Todo - protect with a modifier to limit who can call!