Skip to main content
your comment about constant keyword helped me to understand it better. I thought it might help to others.
Source Link

You want to use

link.call.get()

Also, a better way to do it is just to mark the get function constant. Then it will do a call by default.

This does a simulated transaction call and returns the value. Otherwise, you're doing an actual transaction, and getting the return value.

Dealing with strings can be tricky; they aren't value types, like bytes32, but are a pointer to a dynamic array of bytes, similar to char* in C. See the docs for more info

You want to use

link.call.get()

This does a simulated transaction call and returns the value. Otherwise, you're doing an actual transaction, and getting the return value.

Dealing with strings can be tricky; they aren't value types, like bytes32, but are a pointer to a dynamic array of bytes, similar to char* in C. See the docs for more info

You want to use

link.call.get()

Also, a better way to do it is just to mark the get function constant. Then it will do a call by default.

This does a simulated transaction call and returns the value. Otherwise, you're doing an actual transaction, and getting the return value.

Dealing with strings can be tricky; they aren't value types, like bytes32, but are a pointer to a dynamic array of bytes, similar to char* in C. See the docs for more info

Source Link
Tjaden Hess
  • 37.3k
  • 11
  • 91
  • 118

You want to use

link.call.get()

This does a simulated transaction call and returns the value. Otherwise, you're doing an actual transaction, and getting the return value.

Dealing with strings can be tricky; they aren't value types, like bytes32, but are a pointer to a dynamic array of bytes, similar to char* in C. See the docs for more info