All notable changes to the SDK-redux will be documented in this file.
- [BREAKING] update to @reduxjs/toolkit 2
- [BREAKING] leave only ESM support (no CommonJS)
- use lodash's smaller direct libraries
- sdk-core dependency update
- Node dependency updates
- Reduce transaction tracking expiration from 10 minutes to 3 minutes
- Support for
Pool,PoolMemberandPoolDistributorqueries
- Support for
FlowOperatorquery
- Handle replaced/repriced transaction tracking
- Rename
signertosignerAddress - Removed
waitForConfirmation - Don't export
waitForOneConfirmation
- Use a simpler type for
initiateNewTransactionTrackingThunk.transactionResponse - Use
waitfrom the TransactionResponse to track the transaction more reliably - When
trySerializeTransactionfails, use a warning over an error
- Fix transaction tracking erroneously registering reverted transactions as successful.
- Allow RTK-query
^1.7.0 || ^1.8.0 || ^1.9.0
- Require SDK-core version
^0.6.0 - Pass in
signerthrough mutation payload - Remove
setSignerForSdkRedux - Serialized
transactionResponseis now possibly undefined onTrackedTransactionwhen serialization fails - Update
@reduxjs/toolkit&@superfluid-finance/sdk-coredependencies
- Query for transfer events
- Make it possible to pass in Ether's
Overridesobject through mutations - Add
accountTokenSnapshotLog&tokenStatisticLogendpoints - Add
isSubgraphInSync&blockTransactionSucceededInto a tracked transaction - Export
getSerializeQueryArgs&CacheTagTypes
- Rename mutations and queries for better ordering in source/file explorers:
- For example, "CreateFlow" renamed to "FlowCreateMutation" to go along with "FlowUpdateMutation" and "FlowDeleteMutation" etc
- "MonitorForEventsToInvalidateCache" moved to Subgraph API slice because it uses Subgraph, not an RPC
- Removed
sfApicompletely which combined Subgraph & RPC endpoints. Replaced by leaving justsubgraphApi(only Subgraph as data source) &rpcApi(only RPC as data source) - Redux slices are required to be set up using
*slice*.reducerPathsyntax - Tracked transactions can now contain user defined extra data (see
*tracked transactin*.extraData) which can be specified through the invoked mutation userDatacan now be specified through flow mutations- Tracked transactions now have titles to identify the intent by
- Make it possible to initiate transaction tracking for old pending transactions (see
initiateOldPendingTransactionsTrackingThunk) - Transaction tracking invalidates RPC slice and Subgraph slice separately
- RPC is invalidated in its entirety for now
- Subgraph is polled for the block events of the successful transaction to invalidate the slice normally (based on the event type and its data)
- Save timestamp on the tracked transaction of when tracking started
- Simplify caching logic to just "GENERAL" & "SPECIFIC" tags (NOTE: cache tagging mechanism and the invalidation mechanism need more work)
- The idea behind the simplified chaching logic is that sometimes we need to force invalidate the whole chain or the whole token cache. That's then we use the general tag for invalidation. As a rule of thumb, all queries should provide general cache tags. Other times, when we're listening to the blockchain and only want to invalidate specific parts and not over invalidate the cache, then we use the specific cache tags.
- Bump sdk-core version to include "optimism-mainnet" and "arbitrum-one" support.
- Change sdk-core peer dependency to allow patched updates.
0.2.1 - 2022-02-16
- Using SDK-Core@v0.3.1, SDK-core bug fix propagated to SDK-redux
0.2.0 - 2022-02-01
- Introduce new Redux slice
sfSubgraph(#571) - Support improved querying functionality
- Query all the Subgraph entities with all the possible filters and ordering capabilities
0.1.0 - 2021-12-01
- Initial preview version of SDK-Redux
- Features:
- Wrap SDK-Core with Redux's RTK-Query to enable cache'ing of queries
- Auto-generate React Hooks
- Tracking loading state in order to show UI spinners
- Tracking broadcasted transactions for UI notifications and data updates
- Managing cache lifetimes
- Avoiding duplicate requests for the same data
- Monitoring blockchain events for data updates (including re-orgs)
- Handle errors and offer user opportunity to retry
- Wrap SDK-Core with Redux's RTK-Query to enable cache'ing of queries