All notable changes to the SDK-core will be documented in this file.
This project adheres to Semantic Versioning.
- Handle new Operation types with BatchCall
- Forward ETH value with BatchCall and Operation
- Removed all FlowNFT related functionality, because deprecated from the protocol
- Metadata changes for recently added networks
- Added Degen chain support
- Added
getTotalAmountReceivedByMember
- Map the name from subgraph to an unknown event, instead of "_Unknown".
- Don't lock metadata version to a specific version, use semver (^).
- Allow infinite pagination with 'skip: 0' value (previously had to be undefined)
- Add subgraphs queries for Pools, PoolMembers and PoolDistributors
- Map
isNFTApproval
andisNFTTransfer
onto events
- Support for
CustomSuperToken
contracts withoutCONSTANT_OUTFLOW_NFT()
andCONSTANT_INFLOW_NFT()
function implemented
- Handle the case when
networkData.addresses.governance
is null. This was due to a removal of thegovernance
address from the metadata for test networks in[email protected]
.
- Support for
ConstantOutflowNFT
andConstantInflowNFT
functions
- Support for
CustomSuperToken
contracts withoutgetUnderlyingToken()
function implemented
- Support for new
increaseFlowRateAllowanceWithPermissions
anddecreaseFlowRateAllowanceWithPermissions
functions onCFAv1
class
- Node dependency updates.
- Metadata changes for recently added networks
BatchCall.toOperation
function which unifiesBatchCall
toOperation
typeOperation.toOperationStruct
moved fromBatchCall
toOperation
class
- Bump version to support metadata v1.1.8.
- Subgraph query support for
FlowOperator
hostedEndpoint
might be nullable so we handle this case.
- Support for
sepolia
network
getPopulatedTransactionRequest
doesn't use the signer to populate the transaction anymore assigner.sendTransaction
does it already. The doublesigner.populateTransaction
was causing issues with some wallets (e.g. Rainbow Wallet)- Map
isNativeAssetSuperToken
toToken
from Subgraph
0.6.3 - 2023-03-14
increaseAllowance
anddecreaseAllowance
functions to SuperToken class- Batch call support for
increaseAllowance
anddecreaseAllowance
increaseFlowRateAllowance
anddecreaseFlowRateAllowance
functions to CFAv1 class- Add support for
activeOutgoingStreamCount
,activeIncomingStreamCount
,inactiveOutgoingStreamCount
,inactiveIncomingStreamCount
properties in query forAccountTokenSnapshot
entity - Add support for
rewardAddress
,liquidationPeriod
,patricianPeriod
, andminimumDeposit
properties in query forToken
entity - Add support for
userData
property in query forStream
entity - Add
index
(the Subgraph entity ID) field to Index events when querying from Subgraph
.exec
or.execForward
will throw an error if the operations array is empty
0.6.2 - 2023-02-07
streamId
toFlowUpdatedEvent
when querying from Subgraph- Support for Celo
0.6.1 - 2022-12-20
- Subgraph endpoints all use hosted service endpoints by default
0.6.0 - 2022-12-19
SuperToken
class hassend
functionbatchCall
supports newsend
batch operation- Added
downgradeTo
function onSuperToken
class - Added toga events to be part of query
- Make
sender
field optional in CFAv1 write functions
0.5.9 - 2022-12-05
- Map
deposit
to Stream when querying from Subgraph
- Fix
@nomiclabs/hardhat-ethers/types
dependency error
0.5.8 - 2022-11-02
- Support for mainnet
- Framework initialization for supported networks utilizes
@superfluid-finance/metadata
, but still uses the resolver for unsupported/local testing environments-
NOTE: This will not create any changes when doing
Framework.create
and is just a minor optimization.
-
- All transactions executed via SDK-Core have a default multiplier (1.2x) applied to the provider estimated gas limit unless an ethers
Overrides
object is passed during creation of theOperation
. - There is also the option to pass in an explicit multiplier when executing transactions:
Operation.exec(signer, 1.32)
.
0.5.7 - 2022-10-13
CFAv1Forwarder
integrated into SDK-Core and will be the default way of calling CFA agreements andsender
is now a required property.- Migration: pass sender into the affected CFAv1 callAgreement functions -
create/update/deleteFlow
.NOTE: You must pass
shouldUseCallAgreement
explicitly as a property if you want to execute these calls via the Host.
- typechain files consumed from
@superfluid-finance/ethereum-contracts
and exported from SDK-Core
0.5.6 - 2022-09-07
- Correct
subgraphAPIEndpoint
ingetResolverData
- Don't wrap
SubgraphClient
withSFError
0.5.5 - 2022-08-31
- Support for:
optimism-goerli
andarbitrum-goerli
added
- Support for:
rinkeby
,ropsten
,kovan
,optimism-kovan
andarbitrum-rinkeby
removed - Don't throw
SFError
when executingOperation
orBatchCall
; let the original error bubble up
- Serialize a much smaller version of the cause in
SFError
(onlyname
,message
,code
) - Change
SFError.name
from "Error" to "SFError"
0.5.4 - 2022-08-19
- Properly console the cause, not the caught serialization error
0.5.3 - 2022-08-15
- Map
indexId
toIndexSubscription
when querying from Subgraph
- Catch and handle serialization error
0.5.2 - 2022-07-26
- Support for
isNativeAssetSuperToken
property on SuperToken entity queries callAppAction
Operation creator added toHost
class
BatchCall.getCallDataFunctionArgs
deprecates the oldBatchCall.getCallAgreementFunctionArgs
- Migration:
- Replace
getCallAgreementFunctionArgs
withgetCallDataFunctionArgs
and pass in the fragment/ABI as the first argument, whilst keeping the samecallData
argument.
- Replace
- Migration:
Host.populateCallAgreementTxnAndReturnOperation
is replaced byHost.callAgreement
- Migration:
- Replace instances of
populateCallAgreementTxnAndReturnOperation
withcallAgreement
- Replace instances of
- Migration:
- Handle
CALL_APP_ACTION
operation type correctly in SDK-Core when doing a batch call - Undefined
process
inconstants.ts
in React and client-side apps using SDK-Core directly
0.5.1 - 2022-07-26
- Patch fix serializeError strange serialization
0.5.0 - 2022-07-14
- Support for SetEvent and Subgraph v1.4.4
Framework.operation
method for easily creatingOperation
instances
- Compile AJV validations to prevent unsafe-eval and did not allow SDK-Core usage inside Google Chrome extension due to unsafe-eval CSP
SFError
refactor to be more conventional. It inheritsError
and usescause
to wrap internal errors.- Use
serialize-error
for serializing error object inside the message. - Export Operation & OperationType
SFError.errorObject
renamed toSFError.cause
0.4.4 - 2022-06-30
- Support for new event properties for Subgraph v1.4.1
- Subgraph Query:
rewardAccount
renamed torewardAmountReceiver
onAgreementLiquidatedV2Event
entity chainId
is a required property for framework initializationnetworkId
anddataMode
no longer exist as properties for framework initialization
0.4.3 - 2022-06-29
- BNB Chain support added
maybeCriticalAtTimestamp
is a nullable property now
0.4.2 - 2022-05-17
QueryHandler
for transfer events
0.4.2 - 2022-05-17
- Patched SDK-Core Subgraph files to be in sync with V1 Subgraph endpoint
0.4.1 - 2022-05-14
- Avalanche Network Support
- Network constants consistent with canonical Superfluid name
0.4.0 - 2022-05-06
- Added option to specify block details when querying through a
SubgraphQueryHandler
- Added Subgraph's
_meta
table query - Added
tokenSymbol
forSubgraphQueryHandler
entity queries wheretoken
(token ID) was previously included - Added
PageNumberPaging
for UI development friendly pagination API - Added
AllPaging
to recursively query all results from Subgraph - Added support for
TypedDocumentNode
forSubgraphClient
- Expose underlying ethers.js contracts for each class: CFAv1, Host, IDAv1 and
contracts
property inFramework
class - Added new ACL function support: authorizing flow operator permissions and create/update/delete flow by operator
- Added
nativeTokenSymbol
property toconstants.ts
- Split
SuperToken
class into:WrapperSuperToken
,PureSuperToken
andNativeAssetSuperToken
classes - Added
loadWrapperSuperToken
,loadNativeAssetSuperToken
, andloadPureSuperToken
super token initialization functions - Support
upgrade
,upgradeTo
anddowngrade
functions viaNativeAssetSuperToken
- Added
upgradeTo
toWrapperSuperToken
class as this was missing as well
- Renamed
Token
toERC20Token
- Exported
ERC20Token
- Renamed
PagedResult.data
toPagedResult.items
- Moved
listAllResults
into separate function fromQuery
object - Removed
SubgraphClient.batchRequests
because Subgraph Node didn't support it
- Use
eslint-plugin-prettier
over separateprettier
instance
- The
SuperToken
class is now an abstract base class and no longer contains the functionsupgrade
anddowngrade
. underlyingToken
is possibly undefined onSuperToken
:WrapperSuperToken
hasunderlyingToken
, butPureSuperToken
andNativeAssetSuperToken
do not.NOTE: These changes are due to the split of
SuperToken
intoWrapperSuperToken
,PureSuperToken
andNativeAssetSuperToken
classes.- Migration:
- if you are unsure of the type of the super token, you can use:
await framework.loadSuperToken("0x...");
- if you want to load a wrapper super token, use:
await framework.loadWrapperSuperToken("DAIx");
- if you want to load a native asset super token, use:
await framework.loadNativeAssetSuperToken("ETHx");
- if you want to load a pure super token, use:
await framework.loadPureSuperToken("0x...");
- if you are unsure of the type of the super token, you can use:
- Migration:
0.3.2 - 2022-03-16
- Added "optimism-mainnet" and "arbitrum-one" support
0.3.1 - 2022-02-16
- Added
indexValueCurrent
toIndexSubscription
query to optimize calculating "total amount distributed" in consuming applications (#629) - Added
indexTotalUnits
toIndexSubscription
query to optimize calculating "pool percentage" in consuming applications (#630)
- Typo for
networkName: "arbitrum-rinkeby"
fixed (was expecting"arbitrium-rinkeby"
) inFramework.create
(#637)
- Using
"xdai"
as thenetworkName
will no longer work. Updated to"gnosis"
- Migration: change
networkName
from"xdai"
to"gnosis"
- Migration: change
0.3.0 - 2022-02-02
- New query handlers to cover full spectrum of Subgraph querying capabilities
- Used by the new release of SDK-redux
- Lacks an easy-to-use API for average SDK-core user
_ethers
is not exported for UMD build anymore. Usewindow._ethers
instead.SFError
andErrorType
are now exported- Generated Subgraph types are now exported (
*_Filter
and*_OrderBy
types)- There are a lot of Subgraph types, so it does make the namespace crowded. We'll alleviate it in a later release.
0.2.1 - 2022-01-31
- Load
SuperToken
by token symbol as long as the token is listed on the resolver (#588)
0.2.0 - 2022-01-14
- Support for new testnets: Optimism Kovan, Avalanche Fuji, and Arbitrum Rinkeby (#526)
- Working UMD build added to package and removed duplicated .d.ts typing files from package (#535)
- ethers.js overrides object support added to all
Operation
creation functions (#540) Query
class overhaul: fuller filter and ordering and more generation of types
- package.json cleanup and subgraph schema updated (#522)
- Simpler provider logic for Framework creation (#537)
- Use V1 instead of devSubgraph endpoints (#550)
superTokenFactoryAddress
removed fromIConfig
interface (#556)
- Outdated README.md cleanup and updates (#520, #524, #526, #530, #537, #549, #556)
BatchCall
for callAgreement functions fixed, flow rate calculation utils logic fixed (#526)- Improper base 18 number for flow rate calculation utils (#545)
- single network deploy implemented (#506)
- eslint errors and .json imports fixed (#535)
- Breaking change: Framework.create interface breaking change:
web3Ethers
andhardhatEthers
properties removed (#537)- Migration: if you were using one of these two properties, change the property
web3Ethers
andhardhatEthers
toprovider
- Migration: if you were using one of these two properties, change the property
- Breaking change: non Framework initialized
batchCall
constructor arguments interface change:config
property removed (#556)- Migration: if you instantiated a
BatchCall
without using Framework, you need to remove the config property and replace it with the property:hostAddress
- Migration: if you instantiated a
0.1.0 - 2021-12-01
- Initial preview version of SDK-Core
- Features:
- New
Framework
initialization pattern - Built with
ethers.js
andTypeScript
from the ground up Query
class which leverages the Subgraph for queries with simple filters- New
Operation
class for executing transactions/batching transactions ConstantFlowAgreementV1
andInstantDistributionAgreementV1
helper classes with create, read, update and delete functionality- New
SuperToken
class withSuperToken
CRUD functionality and an underlyingToken
class with basicERC20
functionality - New
BatchCall
class for creating and executing batch calls with supportedOperation's
- New