Skip to content
This repository has been archived by the owner on Nov 25, 2024. It is now read-only.

Latest commit

 

History

History
27 lines (17 loc) · 1.49 KB

File metadata and controls

27 lines (17 loc) · 1.49 KB

getNetFlow

Get the net flow rate value for an account

//load the token you'd like to use like this 
//note that tokens may be loaded by symbol or by address
const daix = await sf.loadSuperToken("DAIx");

let res = await daix.getNetFlow({
  account: string,
  providerOrSigner: ethers.providers.Provider | ethers.Signer
});

Parameters

ParameterTypeDescription
accountstringAddress of account you're getting net flow rate for
providerOrSignerethers.providers.Provider or ethers.Signerethers provider or ethers signer object

Return Value(s)

Returns a string with the below info:

TypeDescription
string

Net flow rate (wei/second) of account for the specified superToken.

Can be positive or negative as it's the sum of the account's inbound and outbound CFA flow rates.

Example Usage

{% embed url="https://github.com/superfluid-finance/super-examples/blob/311e5a95d3505dc8c5d8afd420e9edc8b5a57426/projects/borrow-against-salary/test/EmploymentLoan.test.js#L150" %}