[Solved] local Method call results in: undeclared name: [name]


You are using a pointer receiver for the method QueryPart. From the docs:

Methods with pointer receivers can modify the value to which the
receiver points

So you will need to call the method on the object itself, something similar to this:

contract := SmartContract{}
contract.QueryPart(ctx)

Or to call it directly remove the receiver (convert to a function as commented above by Adrian):

func QueryPart(...) // (s *SmartContract) receiver removed

0

solved local Method call results in: undeclared name: [name]