1

The question is really that simple - I cannot find documentation for this!

there are two things I want to do: One is to define a function and be able to use a value returned from that function in another function. The the is to define a function which can be called through the contract and which returns a value.

This if for the fi smart contract language.

1
  • I've been looking at Fi and had a couple of questions. I don't think it is supported anymore so I'm not holding my breath Mar 13 '20 at 13:29
0

Michelson does not support "getter"-like functions to get values out of the smart contract for, let's say, a back-end/front-end application. However, different tools like Taquito allow you to "read" the storage and get the values you want. According to the Fi docs, it doesn't look possible to declare a function the way you are trying to do. Fi is still quite rudimentary, I would suggest you try Ligo or SmartPy for more complex smart contracts.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.