useDApp icon indicating copy to clipboard operation
useDApp copied to clipboard

Why return array for uints and addresses?

Open eccentricexit opened this issue 4 years ago • 1 comments

Calling a contract function that returns an address, uint or enum gives the result in the first item of an array instead of just returning the value.

Is this on purpose? If so what is the reasoning?

Steps to reproduce:

const [
  publicAddressInContractStorage,
  publicEnumInStorage,
  publicUintInStorage
] = useContractCalls(...)

returns 3 arrays of type string, big number and big number respectively instead of a single array with the values.

eccentricexit avatar Nov 03 '21 13:11 eccentricexit

Noticed varying type conflicts in the useContractCall(s) methods too

ItsShadowl avatar Nov 10 '21 19:11 ItsShadowl