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
isNFTApprovalandisNFTTransferonto events
- Support for
CustomSuperTokencontracts withoutCONSTANT_OUTFLOW_NFT()andCONSTANT_INFLOW_NFT()function implemented
- Handle the case when
networkData.addresses.governanceis null. This was due to a removal of thegovernanceaddress from the metadata for test networks inmetadata@v1.1.17.
- Support for
ConstantOutflowNFTandConstantInflowNFTfunctions
- Support for
CustomSuperTokencontracts withoutgetUnderlyingToken()function implemented
- Support for new
increaseFlowRateAllowanceWithPermissionsanddecreaseFlowRateAllowanceWithPermissionsfunctions onCFAv1class
- Node dependency updates.
- Metadata changes for recently added networks
BatchCall.toOperationfunction which unifiesBatchCalltoOperationtypeOperation.toOperationStructmoved fromBatchCalltoOperationclass
- Bump version to support metadata v1.1.8.
- Subgraph query support for
FlowOperator
hostedEndpointmight be nullable so we handle this case.
- Support for
sepolianetwork
getPopulatedTransactionRequestdoesn't use the signer to populate the transaction anymore assigner.sendTransactiondoes it already. The doublesigner.populateTransactionwas causing issues with some wallets (e.g. Rainbow Wallet)- Map
isNativeAssetSuperTokentoTokenfrom Subgraph
0.6.3 - 2023-03-14
increaseAllowanceanddecreaseAllowancefunctions to SuperToken class- Batch call support for
increaseAllowanceanddecreaseAllowance increaseFlowRateAllowanceanddecreaseFlowRateAllowancefunctions to CFAv1 class- Add support for
activeOutgoingStreamCount,activeIncomingStreamCount,inactiveOutgoingStreamCount,inactiveIncomingStreamCountproperties in query forAccountTokenSnapshotentity - Add support for
rewardAddress,liquidationPeriod,patricianPeriod, andminimumDepositproperties in query forTokenentity - Add support for
userDataproperty in query forStreamentity - Add
index(the Subgraph entity ID) field to Index events when querying from Subgraph
.execor.execForwardwill throw an error if the operations array is empty
0.6.2 - 2023-02-07
streamIdtoFlowUpdatedEventwhen 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
SuperTokenclass hassendfunctionbatchCallsupports newsendbatch operation- Added
downgradeTofunction onSuperTokenclass - Added toga events to be part of query
- Make
senderfield optional in CFAv1 write functions
0.5.9 - 2022-12-05
- Map
depositto Stream when querying from Subgraph
- Fix
@nomiclabs/hardhat-ethers/typesdependency 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.createand 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
Overridesobject 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
CFAv1Forwarderintegrated into SDK-Core and will be the default way of calling CFA agreements andsenderis now a required property.- Migration: pass sender into the affected CFAv1 callAgreement functions -
create/update/deleteFlow.NOTE: You must pass
shouldUseCallAgreementexplicitly as a property if you want to execute these calls via the Host.
- typechain files consumed from
@superfluid-finance/ethereum-contractsand exported from SDK-Core
0.5.6 - 2022-09-07
- Correct
subgraphAPIEndpointingetResolverData
- Don't wrap
SubgraphClientwithSFError
0.5.5 - 2022-08-31
- Support for:
optimism-goerliandarbitrum-goerliadded
- Support for:
rinkeby,ropsten,kovan,optimism-kovanandarbitrum-rinkebyremoved - Don't throw
SFErrorwhen executingOperationorBatchCall; let the original error bubble up
- Serialize a much smaller version of the cause in
SFError(onlyname,message,code) - Change
SFError.namefrom "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
indexIdtoIndexSubscriptionwhen querying from Subgraph
- Catch and handle serialization error
0.5.2 - 2022-07-26
- Support for
isNativeAssetSuperTokenproperty on SuperToken entity queries callAppActionOperation creator added toHostclass
BatchCall.getCallDataFunctionArgsdeprecates the oldBatchCall.getCallAgreementFunctionArgs- Migration:
- Replace
getCallAgreementFunctionArgswithgetCallDataFunctionArgsand pass in the fragment/ABI as the first argument, whilst keeping the samecallDataargument.
- Replace
- Migration:
Host.populateCallAgreementTxnAndReturnOperationis replaced byHost.callAgreement- Migration:
- Replace instances of
populateCallAgreementTxnAndReturnOperationwithcallAgreement
- Replace instances of
- Migration:
- Handle
CALL_APP_ACTIONoperation type correctly in SDK-Core when doing a batch call - Undefined
processinconstants.tsin 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.operationmethod for easily creatingOperationinstances
- Compile AJV validations to prevent unsafe-eval and did not allow SDK-Core usage inside Google Chrome extension due to unsafe-eval CSP
SFErrorrefactor to be more conventional. It inheritsErrorand usescauseto wrap internal errors.- Use
serialize-errorfor serializing error object inside the message. - Export Operation & OperationType
SFError.errorObjectrenamed toSFError.cause
0.4.4 - 2022-06-30
- Support for new event properties for Subgraph v1.4.1
- Subgraph Query:
rewardAccountrenamed torewardAmountReceiveronAgreementLiquidatedV2Evententity chainIdis a required property for framework initializationnetworkIdanddataModeno longer exist as properties for framework initialization
0.4.3 - 2022-06-29
- BNB Chain support added
maybeCriticalAtTimestampis a nullable property now
0.4.2 - 2022-05-17
QueryHandlerfor 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
_metatable query - Added
tokenSymbolforSubgraphQueryHandlerentity queries wheretoken(token ID) was previously included - Added
PageNumberPagingfor UI development friendly pagination API - Added
AllPagingto recursively query all results from Subgraph - Added support for
TypedDocumentNodeforSubgraphClient - Expose underlying ethers.js contracts for each class: CFAv1, Host, IDAv1 and
contractsproperty inFrameworkclass - Added new ACL function support: authorizing flow operator permissions and create/update/delete flow by operator
- Added
nativeTokenSymbolproperty toconstants.ts - Split
SuperTokenclass into:WrapperSuperToken,PureSuperTokenandNativeAssetSuperTokenclasses - Added
loadWrapperSuperToken,loadNativeAssetSuperToken, andloadPureSuperTokensuper token initialization functions - Support
upgrade,upgradeToanddowngradefunctions viaNativeAssetSuperToken - Added
upgradeTotoWrapperSuperTokenclass as this was missing as well
- Renamed
TokentoERC20Token - Exported
ERC20Token - Renamed
PagedResult.datatoPagedResult.items - Moved
listAllResultsinto separate function fromQueryobject - Removed
SubgraphClient.batchRequestsbecause Subgraph Node didn't support it
- Use
eslint-plugin-prettierover separateprettierinstance
- The
SuperTokenclass is now an abstract base class and no longer contains the functionsupgradeanddowngrade. underlyingTokenis possibly undefined onSuperToken:WrapperSuperTokenhasunderlyingToken, butPureSuperTokenandNativeAssetSuperTokendo not.NOTE: These changes are due to the split of
SuperTokenintoWrapperSuperToken,PureSuperTokenandNativeAssetSuperTokenclasses.- 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
indexValueCurrenttoIndexSubscriptionquery to optimize calculating "total amount distributed" in consuming applications (#629) - Added
indexTotalUnitstoIndexSubscriptionquery 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 thenetworkNamewill no longer work. Updated to"gnosis"- Migration: change
networkNamefrom"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
_ethersis not exported for UMD build anymore. Usewindow._ethersinstead.SFErrorandErrorTypeare now exported- Generated Subgraph types are now exported (
*_Filterand*_OrderBytypes)- 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
SuperTokenby 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
Operationcreation functions (#540) Queryclass 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)
superTokenFactoryAddressremoved fromIConfiginterface (#556)
- Outdated README.md cleanup and updates (#520, #524, #526, #530, #537, #549, #556)
BatchCallfor 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:
web3EthersandhardhatEthersproperties removed (#537)- Migration: if you were using one of these two properties, change the property
web3EthersandhardhatEtherstoprovider
- Migration: if you were using one of these two properties, change the property
- Breaking change: non Framework initialized
batchCallconstructor arguments interface change:configproperty removed (#556)- Migration: if you instantiated a
BatchCallwithout 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
Frameworkinitialization pattern - Built with
ethers.jsandTypeScriptfrom the ground up Queryclass which leverages the Subgraph for queries with simple filters- New
Operationclass for executing transactions/batching transactions ConstantFlowAgreementV1andInstantDistributionAgreementV1helper classes with create, read, update and delete functionality- New
SuperTokenclass withSuperTokenCRUD functionality and an underlyingTokenclass with basicERC20functionality - New
BatchCallclass for creating and executing batch calls with supportedOperation's
- New