You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've got problem with creation function that returns struct array.
My function looks like: getPoolsInfo(address[]) then the output is array of structs. Struct has fields: address, string, string
I tried to create function like this:
val f = Function("getPoolsInfo(address[])", "(address,string,string)[]")
But ide is screaming that it cannot cast arraytype to tupletype.
Can you tell me how to construct this function properly?
The text was updated successfully, but these errors were encountered:
Inputs and outputs must be specified by a TupleType, as all Functions accept a Tuple of arguments and return a Tuple of return values. What you're looking for is a singleton return type, a tuple with one element. Try:
I've got problem with creation function that returns struct array.
My function looks like: getPoolsInfo(address[]) then the output is array of structs. Struct has fields: address, string, string
I tried to create function like this:
val f = Function("getPoolsInfo(address[])", "(address,string,string)[]")
But ide is screaming that it cannot cast arraytype to tupletype.
Can you tell me how to construct this function properly?
The text was updated successfully, but these errors were encountered: