tact-docs icon indicating copy to clipboard operation
tact-docs copied to clipboard

book/import#import-func-code lacks examples of importing FunC functions returning tuples

Open anton-trunov opened this issue 1 year ago • 2 comments

As Tact does not have tuple types (at least yet), like FunC does, importing such functions is challenging for users:

For instance, how does one import a function like the following?

(int, int) derive_pub_key(priv_key: int);

An obvious attempt for the novice Tact programmer fails:

@name(derive_pub_key)
native derivePubKey(privKey: Int): (Int,Int);   // (Int, Int) is invalid Tact

anton-trunov avatar Apr 09 '24 16:04 anton-trunov