Im communicating with a smart contract trying to get the balances from a list of addresses. I then want to get the sum of all balances but I am stuck on actually creating the array to store all the balances.. I need a type of big.Int but have no idea how to create it for my array. so far my code is:
balances := make([]int, 0)
for _, address := range getAddresses {
getAddressBalance, err := token.BalanceOf(&bind.CallOpts{Pending: true}, address)
balances = append(balances, getAddressBalance)
}
and the error i get is
cannot use getAddressBalance (type *big.Int) as type int in append