Created
November 11, 2020 10:13
-
-
Save nCally/87d6c27aff4ef5448ec737845e52194a to your computer and use it in GitHub Desktop.
Where I call contract
This file contains hidden or 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
| import createEsusuContract from "./contract-creator"; | |
| import Groups from './abis/Groups.json'; | |
| import ADDRESS from "./abis/addresses"; | |
| async function getGroupsCount() { | |
| const contract = await createEsusuContract(Groups.abi, ADDRESS.GROUPS); | |
| try { | |
| const res = await contract.methods.getGroupsLength().call(); | |
| return res; | |
| } catch (err) { | |
| console.log(err) | |
| } | |
| } | |
| export default getGroupsCount; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment