Created
March 8, 2023 14:17
-
-
Save mathieu166/e73ad7f0e68d8e7567e7e1edee3cd918 to your computer and use it in GitHub Desktop.
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.18+commit.87f61d96.js&optimize=false&runs=200&gist=
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.16; | |
contract DripPriceReaderV1 { | |
uint public _bnbPrice; | |
uint public _dripBnbRatio; | |
constructor(uint bnbPrice, uint dripBnbRatio){ | |
_bnbPrice = bnbPrice; | |
_dripBnbRatio = dripBnbRatio; | |
} | |
function getBnbPrice() public view returns (uint) { | |
return _bnbPrice; | |
} | |
function getDripBnbRatio() public view returns (uint){ | |
return _dripBnbRatio; | |
} | |
function getDripFoundtainPrice() public view returns (uint){ | |
return (_dripBnbRatio * _bnbPrice) / (10 ** 18); | |
} | |
function getDripPcsPrice() public pure returns (uint){ | |
return 0; | |
} | |
function getBr34pBnbRatio() public pure returns (uint){ | |
return 0; | |
} | |
function getBr34pPrice() public pure returns (uint){ | |
return 0; | |
} | |
function getAllStats() public view returns (uint bnbPrice, uint dripBnbRatio, uint dripFountainPrice, uint dripPcsPrice, uint br34pBnbRatio, uint br34pPrice){ | |
bnbPrice = getBnbPrice(); | |
dripBnbRatio = getDripBnbRatio(); | |
dripFountainPrice = getDripFoundtainPrice(); | |
dripPcsPrice = getDripPcsPrice(); | |
br34pBnbRatio = getBr34pBnbRatio(); | |
br34pPrice = getBr34pPrice(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment