In the words of Smash Mouth, "and they don't stop coming" - I think the song was actually about the frequency and intensity of Hive Stream updates, but I could be wrong about that. This week we see some more big-ticket items make their debut.
Price Data
When it comes to building a dApp you inevitably want a way to chart the current price of a cryptocurrency, specifically the value of HIVE and HBD. If users can buy X amount of in-game currency or credits, you want a way to ensure the value is handled accordingly. This is where price data comes in handy.
While this feature has yet to be released, in the master branch there is functionality to get exchange pricing data in different currencies. Right now, prices are only retrieved from Bittrex as they have both HIVE and HBD trading pairs we can use to get the value of in comparison to Bitcoin and USD.
The only adapter so far is Bittrex as can be seen here, however, a way to add in Probit is being investigated. Community contributions are welcome for new adapters, right now, there are no plans to make this a feature where you can write your own interfaces given the low number of exchanges that HIVE and HBD can be found on.
A lottery contract
This has been worked on and off over the last couple of weeks, a contract for running a time-based lottery. The plan is to actually create a UI using this contract as an example of what you can build, all code open-sourced to the Hive community from a security scrutiny perspective as well as a showcase of how you can build dApps which do more than just reacting to events as they're detected as the usual examples do.
Time-based action improvements
After debuting time-based actions in the previous release, a few improvements have been made to ensure they function as required. One such scenario is a situation when your server might go down and time has passed beyond that of a registered action, to convolute things further, what happens if the same method is called by different actions? You only want in the instance an action is replaying to happen once, not repeatedly.
You can now also specify tasks to happen weekly in your application. Preliminary work and testing on supporting longer periods of time such as fortnightly and monthly are also on the list, but given they're significant periods of time, proper testing will need to be done before I am comfortable expanding out support that far.
More tests
After scrapping a majority of the tests as the library has changed significantly since the Steem days, a lot of work has been done focusing on writing new and better tests covering the majority of the library. One of those areas is ensuring the demo contracts (dice and lottery) both have significant test cases as they deal with the transferring of funds.
What's next?
More work on time-based actions, more testing and another big-ticket item is the integrity of contracts. I did some initial testing but then got preoccupied with other things that seemed more pressing. More work is also planned on the exchange pricing feature and exposing that in an easy way (including inside of contracts).
As always, contributions from the community are always welcomed. The repository can be found on GitHub here. If you encounter any issues or problems, please also don't hesitate to create an issue on the aforementioned repository.