Last active
May 1, 2020 15:24
-
-
Save erin-koen/ed21d589417b2584ae2d6d4014bae94d to your computer and use it in GitHub Desktop.
The Melon Bot's Balance Method
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public async getBalances() { | |
// find the fund's accounting address | |
const accountingAddress = (await this.hub.getRoutes()).accounting; | |
// and instantiate a js representation of the contract | |
const accounting = new Accounting(this.environment, accountingAddress); | |
// to call the getFundHoldings method | |
const fundHoldings = await accounting.getFundHoldings(); | |
// which returns an array of hodlings. | |
return fundHoldings as FundHolding[]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment