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
});
Parameter | Type | Description |
---|---|---|
account | string | Address of account you're getting net flow rate for |
providerOrSigner | ethers.providers.Provider or ethers.Signer | ethers provider or ethers signer object |
Returns a string with the below info:
Type | Description |
---|---|
string | Net flow rate (wei/second) of Can be positive or negative as it's the sum of the account's inbound and outbound CFA flow rates. |
{% embed url="https://github.com/superfluid-finance/super-examples/blob/311e5a95d3505dc8c5d8afd420e9edc8b5a57426/projects/borrow-against-salary/test/EmploymentLoan.test.js#L150" %}