I think that next asset will be ETH
Consistency is key, always!!
Keep building.
Thank you! @manfred_jr
Thank you for your reply, I understand that well now
@ines_valerie I’m glad to hear that you found the answer helpful! If you have any more questions or need further clarification, feel free to ask.
Exciting update: New market added - ETH
We’re thrilled to announce that we’ve successfully added support for a new market:
- Ethereum (ETH)!
Now you can make forecasts about the price movements of Ethereum.
Happy predicting!
You guessed @donaldg !
Maybe next time
It’s well, so any decision I made is based on my own risk
Adding support for Eth, does this mean possibility of migration to other chains asides Tron moving forward?
If yes, it’s really bullish for the future of GTP.
Absolutely.
You understood correctly.
Hello again @manfred_jr .
Thanks for your question, and we’re glad to see your interest in our project!
Adding support for assets like “ETH,” “BTC,” or any other asset doesn’t mean integrating a new chain into our platform. “GuessThePrice” currently operates on the BitTorrent Chain [Testnet], and the addition of these assets simply provides users with more options for creating price forecasts.
If your question relates to the possibility of adding new chains or transforming our platform into a multi-chain price forecasting platform, then yes, it is indeed possible.
However, it’s important to clarify that, for now, our primary focus remains on the BitTorrent Chain.
Thanks
Considering your project goal, it is a great choice. Kudos to team, all the best
Thank you @AdelEdv !
Yes I find it very very helpful because you take your time to explain and your words are simple and straight to the point, thank you
Hello GTP team! Thank for joining the TRON hackathon, first of all kudos for open sourcing your project!
By checking your repo I could not find the Band protocol integration, would you please point to the contract for me please?
I’m curious to know why you didn’t add BTT price prediction as well as it is straightforward to add it using Band.
Overall the UI of your site looks great, keep on building with such quality!
Keep on building on BTTC
I clearly get it how you intend to stand the line and stay focused by building solely on Tron/BitTorrent Chain, thanks for sharing and goodluck.
Hello @SimbadMarino !
I will try to explain everything to you in as much detail as possible.
- I followed the “Band Protocol” documentation. Link: With Solidity | Band Protocol .
The documentation says (quote):To query prices from Band Protocol’s oracle, a smart contract should reference Band’s
StdReference
contract, specifically thegetReferenceData
andgetReferenceDatabulk
methods.
- I used the
StdReferenceProxy
contract deployed by “Band Protocol” on the BTTC Testnet.- Explorer link: StdReferenceProxy | Address 0x8c064bCf7C0DA3B3b090BAbFE8f3323534D84d68 | BTTC.
- A complete list of networks supported by the Band Chain protocol and addresses of deployed contacts can be found here: Supported Blockchains | Band Protocol
- This contract has a method
getReferenceData
which returns the price data for the given “base/quote” pair.
Simple example from documentation [Link]
import interfaces/IStdReference.sol
contract Demo {
IStdReference public ref;
constructor(IStdReference _ref) public {
ref = _ref;
}
function demo() external view returns (IStdReference.ReferenceData memory) {
return ref.getReferenceData("BTC", "USD");
}
}
How did I integrate this?
The integration can be seen in the file ForecastMarketplace.sol
-
I declared the interface
IStdReference
(line 12 - 22):interface IStdReference { struct ReferenceData { uint256 rate; uint256 lastUpdatedBase; uint256 lastUpdatedQuote; } function getReferenceData(string memory _base, string memory _quote) external view returns (ReferenceData memory); function getReferenceDataBulk(string[] memory _bases, string[] memory _quotes) external view returns (ReferenceData[] memory); }
-
As in the example from the documentation, I set the
StdReferenceProxy
address at the time of deployment (in constructor) and save it in theref
variable:// line 25 IStdReference public ref; // line 54 - 59 constructor(IStdReference _ref) ERC721("ForecastMarket", "ForecastMarket") { ref = _ref; contractOwner = msg.sender; lastMarketplaceId = 0; lastForecastId = 0; }
In our case, this is the address of deployed contract in the BTT Testnet -
0x8c064bCf7C0DA3B3b090BAbFE8f3323534D84d68
-
And then in the necessary methods of my contract I call the
getReferenceData
method, which returns the price of the desired asset.
Example: View method that returns the price of an asset:// line 161 - 163 function getAssetPrice(string memory assetName) public view returns (uint256) { return ref.getReferenceData(assetName, "USD").rate; }
Let me know if I answered your question.
Thanks for the mention, we were just thinking about adding BTT (BitTorrent) these days.
We did it today.
And yes, you’re right, it was easy to add BTT using BandChain Price Feeds, like other previously added assets (TRX, BTC, ETH).
Below you can see screenshots of what it looks like.
Thank you !
• P.S.
I checked the explorer and saw a failed transaction (I assume that you tried to buy a forecast from the “Explore & Trade” section)
I checked what was going on and realized that there was an error in the recent frontend update (a different contract address was specified). The error has now been fixed
If this was you, you can try buying a forecast again and let me know how it worked out for you.
Hello @Hoppledd .
Thank you
@thamonstor Hi, your project looks promising. Good luck !
Thank you @fehmeedBo !