Releases: trufflesuite/drizzle-legacy
v1.4.0 - improved redux store configuration, bug fixes and more
There's an old saying: April showers bring May flowers. Well, we don’t know much about flowers, though we hope this release will nurture your flourishing dapps! 🌼 We've spent the last few weeks improving Drizzle so your developer experience continues to be productive, efficient and fun.
Help us help you! 🤜🤛 It's the front-end's time to shine in the blockchain space and to that end, we'd appreciate getting your feedback both on Drizzle itself and the general state of dapp front-end dev through this brief survey.
What's new
Notable Improvements
- #190 fixes the error when applying options to send or call.
- Updated git flow for our contributors
- #147, #205 A better mechanism to coordinate with external services.
Improved Redux State Creation
📖 Docs: Using Drizzle's Redux Store
Drizzle is ideal for synchronizing contract state with a user interface, but as Dapps grow in complexity we foresee growing demand for coordination with off-chain services. Dapps now have the ability to more easily integrate with Drizzle's redux store for state management and event notification.
Specifically generateStore
can be configured to mange a Dapp's reducers and sagas for better state management, and it accepts redux middleware functions to handle use cases where the Dapp needs to integrate with other services based on Drizzle events. #147 is one compelling use case for this feature.
The New generateStore
API
generateStore
creates the Redux store by combining drizzleOptions, application reducers, sagas, and middlewares. You can pass these in via a configuration object.
Parameters:
config.drizzleOptions
- drizzle configuration object, requiredconfig.reducers
- application specific reducers, defaults to{}
config.appSagas
- application sagas, defaults to[]
config.appMiddlewares
- application middlewares, defaults to[]
config.disableReduxDevTools
- boolean to enable/disable Redux devtools hook, defaults tofalse
Return Value:
- A configured Redux
store
New Tutorial: Drizzle & Contract Events
👨🏫 Tutorial: Drizzle & Contract Events | Repository
To show off our new middleware capabilities, we've written a tutorial that uses Drizzle to show a toast notification when a smart contract event fires. Check it out!
Changelog
New Features
- Delegate concerns to Drizzle's store
Bug Fixes/Improvements
- #176 Configure Travis to target current and LTS versions of Node. (@DiscRiskandBisque)
- #182 Lock down Travis' Websocket dependency (@DiscRiskandBisque)
- #185 Git ignore yarn files (@guix77)
- #190 Handles web3 send and call options correctly. (@rawfalafel)
- #205 Feature/improve redux state creation. Fixes #147. (@cds-amal)
v1.3.3
Patch release to lock web3
to version 1.0.0-beta.35
. 🔒 Later versions will cause test failure.
v1.3 - Tests, React Native Support & More!
Polar vortex got you stuck inside? ❄️ We've got you covered with some tasty new Drizzle features to keep you huddled up to that toasty computer! Beyond new features, we've also spent time improving overall code quality with linting and automated tests.
Help us help you! 🤜🤛 It's the front-end's time to shine in the blockchain space and to that end, we'd appreciate getting your feedback both on Drizzle itself and the general state of dapp front-end dev through this brief survey.
New Features
React Native & Server-side Rendering Support!
We're happy to announce that Drizzle now supports server-side rendering and React Native. Your dapps can now render more quickly and in more places than ever before!
👨🏫 Tutorial | 📦 Truffle Box
Bring Your Own Provider
You can now provide your own full web3 provider
object via the web3.customProvider
option.
📖 Docs
The Current Block is in the Store
New blocks are what make Drizzle tick and now we've made it easier to access the current block. The currentBlock
key in the store will contain the latest block as and object result from web3.getBlock()
, facilitated by the PROCESSING_BLOCK
action.
📖 Docs
Track Cancelled/Failed Transactions More Easily
Transactions are now assigned a temporary ID when pushed onto the transactionStack
. Once broadcasted, the temporary ID is overwritten with the transaction hash. If there's an error that results in no transaction being broadcasted (e.g. rejecting a transaction), you can now use the temp value as the key in transactions
object to look up the error.
📖 Docs
Remove Contracts Dynamically
Now with the Drizzle.deleteContract()
function, Drizzle will remove a contract's state from the store and stop synchronizing the contract's state on new blocks.
📖 Docs
Changelog
New Features
- #154 React Native Support (@honestbonsai)
- #164 New feature: remove contracts (@honestbonsai)
- #170 Track current block in store (@DiscRiskandBisque)
Bug Fixes/Improvements
- #152 Webpack config fix to re-enable Babel transforms (@adrianmcli)
- #153 Webpack config changes to allow server-side rendering (@chrischip)
- #159 Assign all txs a temp key so when error due to user metamask rejection (@honestbonsai)
- #165 Tests & customProvider option (@cds-amal)
Acknowledgements
Every member of the front-end team has touched this release and deserves a special thank you: Adrian Li (@adrianmcli), Heyse Li (@honestbonsai) and Amal Sudama (@cds-amal). We look forward to producing releases more frequently and with greater confidence. Happy coding! 😊
v1.2.5
Updates/Fixes:
- Removes need to use
generateStore()
function outside of Drizzle initialization. Drizzle will now call this function internally when no store is passed. For now, the separate function is still exported for backward compatibility. - Better error messaging when contract not found on current network. Replaces "uncaught root@root" error when contract not found with "Contract ${contractName} not found on network ID: ${networkId}".
- Removed unused import of
getAbi
(thanks @pors for #123 )
v1.2.4
v1.2.3
Fixes:
- Push to stack not updating state (thanks to @agildehaus6 for #105).
v1.2.2
Fixes:
- Updates to support Webpack 4 and React 16 (Thanks @dangell7 for #88).
- Corrected
import
statement forgenerateContractInitialState()
. Fixes #24 indrizzle-box
. syncAlways
option not making it to Saga properly (Thanks @mnaamani for #94).- Added dependencies to
package.json
file for distribution. Fixes #59, #78.
v1.2.1
v1.2 - Community Improvements and Greater Flexibility
FEATURES
- Can dynamicallly add contract with
addContract
method orADD_CONTRACT
event.- Special thanks to @asselstine for #64
- 📖 Docs: Adding Contracts Dynamically
- No longer required to use Truffle artifacts, can use a contract's name and ABI.
- Special thanks to @asselstine for #64
- 📖 Docs:
contracts
Option
- Can process all contracts at each block with the
syncAlways
option. Useful if you're using a proxy contract that obfuscates your contract's address. - Can configure contract events.
- Special thanks to @nharlow89 for #40
- 📖 Docs:
events
Option
FIXES
- Transactions that are contract creation events (and other txs having no
to
field) no longer throw errors. Special thanks to @protolambda for #56. - Web3 init events now properly caught & Drizzle will now load asynchronously. Special thanks to @sklingler93 for #60.
v1.1.5
Updates:
- Bumped
web3
to^1.0.0-beta.34
.
Fixes:
- General transaction flow improvements; sometimes the
CONTRACT_SYNCED
event would fire before the finalGOT_CONTRACT_VAR
event. - When processing blocks, converts transaction addresses to lowercase. Checksums were sometimes causing false inequalities.