Skip to content

Instantly share code, notes, and snippets.

@nCally
Created November 11, 2020 10:13
Show Gist options
  • Select an option

  • Save nCally/87d6c27aff4ef5448ec737845e52194a to your computer and use it in GitHub Desktop.

Select an option

Save nCally/87d6c27aff4ef5448ec737845e52194a to your computer and use it in GitHub Desktop.
Where I call contract
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