Carry out several calls with only one RPC call.
go get github.com/omnes-tech/multicallInstantiate the multicall client:
client, err := multicall.NewClient("http://localhost:8545", nil)
if err!= nil {
log.Fatal(err)
}Now you just need to call any method you need!
Write (transaction) functions:
AggregateCallsTryAggregateCallsTryAggregateCalls3
Read (call) functions:
SimulateCallAggregateStaticTryAggregateStaticTryAggregateStatic3CodeLengthsBalancesAddressesData
Check out the deployed addresses here on different chains.